Skip to content

Latest commit

 

History

History
62 lines (37 loc) · 1.93 KB

README.md

File metadata and controls

62 lines (37 loc) · 1.93 KB

RealWorld Example App

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.

Prerequisites

  • Make sure your have a Node.js (v14 or newer) installed.
  • Make sure you have your database setup.

Installation

Install all the npm dependencies with the following command:

npm install

Development

Configuration

In 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

Starting the development server

Start the development environment with the following command:

npm run dev

Testing

To run the tests, run the following command:

npm test

Production

The following command will build the production version of the app:

npm start