React / Express.js / Sequelize / PostgreSQL codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
This codebase was created to demonstrate a fully fledged fullstack application built with React / Express.js / Sequelize / PostgreSQL including CRUD operations, authentication, routing, pagination, and more.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
- Make sure your have a Node.js (v14 or newer) installed.
- Make sure you have your database setup.
Install all the npm dependencies with the following command:
npm installIn the backend directory, duplicate and remane the.env.example file, name it .env, and modify it to set all the required private development environment variables.
Optionally you can run the following command to populate your database with some dummy data:
npx -w backend sequelize-cli db:seed:all
Start the development environment with the following command:
npm run dev-
The frontend website should be available at http://localhost:3000/.
-
The backend API should be available at http://localhost:3001/api.
To run the tests, run the following command:
npm testThe following command will build the production version of the app:
npm start