Step 1 - Once the project is downloaded, change the directory to
react-ui.
$ cd react-uiStep 2 - Install dependencies via NPM or yarn
$ npm i
// OR
$ yarnStep 3 - Start in development mode
$ npm start
// OR
$ yarn startAt this point, the app is available in the browser localhost:3000 (the default address).
Step 1 - Change the directory to
api-server-nodejs
$ cd api-server-nodejsStep 2 - Install dependencies via NPM or yarn
$ yarnStep 3 - Run the SQLite migration via TypeORM
$ yarn typeorm migration:runStep 4 - Start the API server (development mode)
$ yarn devThe API server will start using the PORT specified in .env file (default 5000).
< ROOT / src >
|
|-- config/
| |-- config.ts # Configuration
| |-- passport.ts # Define Passport Strategy
|
|-- migration/
| |-- some_migration.ts # database migrations
|
|-- models/
| |-- activeSession.ts # Sessions Model (Typeorm)
| |-- user.ts # User Model (Typeorm)
|
|-- routes/
| |-- users.ts # Define Users API Routes
|
|
|-- index.js # API Entry Point
|-- .env # Specify the ENV variables
|
|-- ************************************************************************The SQLite Path is set in .env, as SQLITE_PATH
Generate migration:
$ yarn typeorm migration:generate -n your_migration_namerun migration:
$ yarn typeorm migration:run