Starter code for projects that require user authentication (email+password)
- Full-stack web development with Remix
- Styling with TailwindCSS
- Database with PostgreSQL & Prisma
- Node.js version 18 or higher
- A PostgreSQL database and its connection string, either hosted locally for development or hosted for production
-
Copy
.example.env
to a new file named.env
at the root of the project, and fill in the values as described. -
Run
yarn install
to install dependencies. -
Run the required database migrations:
- In development:
npx prisma migrate dev
- In production:
npx prisma migrate deploy
- In development:
From your terminal:
yarn dev
This starts the app in development mode, rebuilding assets on file changes.
If you make changes to the database schema, you will need to run npx prisma migrate dev
again before restarting the server.
If changes were made to the database schema, first run:
npx prisma migrate deploy
Next, build your app for production:
yarn build
Then run the app in production mode:
yarn start