This is a simple PERN app with JWT authentication. Feel free to download it as an underlay to your Node.js app
PostgreSQL
Express
React JS
Node JS
PostgreSQL v.14.2 or higher.
Node JS v14.15.4 or higher.
- Create
.envfile inside client folder based on the.env.examplefile. - Create ENV files inside server folder based on the
.env.examplefile. For development the name should bedevelopment.env, for production the name should beproduction.envand so on. - Create
.envfile inside client folder based on the.env.examplefile. - For development mode,
docker-compose -f docker-compose.dev.yml up -dfrom root folder. - From your server's container run
node utils/generateKeyPair.jsto generate private and public key for JWT authentication. - From your server's container run
npx sequelize-cli db:migrateto migrate your database. - From your server's container run
npx sequelize-cli db:seed:allto seed your database (optional).
- Create your PostgreSQL database.
- Go to the
serverfolder. - Create the your
.envfile based on.env.example. For development the name should bedevelopment.env, for production the name should beproduction.envand so on. - Run
npm install. - Create your private and public key for JWT by running
node utils/generateKeyPair. - Run the migration files with
npx sequelize-cli db:migrate. - Run the seeder files with
npx sequelize-cli db:seed:all(optional). - Run the server in your local with
npm run dev.
- Go to the
clientfolder. - Create the your
.envfile based on.env.example. - Run
npm install. - Run the client in your local with
npm start.
Github: https://github.com/aidenraadh
Email: [email protected]
Website: aidenraadh.com