Simple TODO app using the Next.js React framework.
This application is meant to be some kind of boilerplate for me to learn about the various tools used in web development.
Install nvm (https://github.com/nvm-sh/nvm/blob/master/README.md)
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash$ nvm install v16.12.0$ npm install --production$ npm run build$ npm start$ npm run devThe application is accessible at http://127.0.0.1:3000.
$ npm run lintStart podman VM:
$ podman machine startBuild container image using the Containerfile in folder postgresql:
$ podman build -t postgresdb:latest .Run test PostgreSQL database container:
$ podman run -d --rm --name postgres -p 15432:5432/tcp postgresdb:latestInitialize database with Prisma
$ npx prisma db pushTroubleshooting the database (from host)
$ psql -h 127.0.0.1 -p 15432 -U testuser -d testdb$ nvm ls
$ nvm use v16.14.2
$ npm ci
$ npm run build --if-present- Environment variables to configure:
DATABASE_URL=postgresql://<username>:<password>@<database server URL>:5432/<database name>NEXTAUTH_URL=https://example.com/api/authGITHUB_IDGITHUB_SECRETNEXTAUTH_SECRETthat can be generated using$ openssl rand -base64 32CORS_ALLOWED_ORIGINto set the HTTP headerAccess-Control-Allow-Originto something else than*