- Postgres(>=9.4)
- Sequelize CLI (
[sudo] npm install -g sequelize-cli
)
βββ mocha.conf.js
βββ package-lock.json
βββ package.json
βββ server
βΒ Β βββ api
βΒ Β βΒ Β βββ thing
βΒ Β βΒ Β βΒ Β βββ index.js
βΒ Β βΒ Β βΒ Β βββ thing.controller.js
βΒ Β βΒ Β βΒ Β βββ thing.events.js
βΒ Β βΒ Β βΒ Β βββ thing.helper.js
βΒ Β βΒ Β βΒ Β βββ thing.model.js
βΒ Β βΒ Β βΒ Β βββ thing.socket.js
βΒ Β βΒ Β βββ user
βΒ Β βΒ Β βββ index.js
βΒ Β βΒ Β βββ user.controller.js
βΒ Β βΒ Β βββ user.events.js
βΒ Β βΒ Β βββ user.model.js
βΒ Β βββ auth
βΒ Β βΒ Β βββ auth.service.js
βΒ Β βΒ Β βββ facebook
βΒ Β βΒ Β βΒ Β βββ ...
βΒ Β βΒ Β βββ google
βΒ Β βΒ Β βΒ Β βββ ...
βΒ Β βΒ Β βββ index.js
βΒ Β βΒ Β βββ local
βΒ Β βΒ Β βΒ Β βββ ...
βΒ Β βΒ Β βββ twitter
βΒ Β βΒ Β βββ ...
βΒ Β βββ components
βΒ Β βΒ Β βββ errors
βΒ Β βΒ Β βΒ Β βββ index.js
βΒ Β βΒ Β βββ utils
βΒ Β βΒ Β βββ logger.js
βΒ Β βΒ Β βββ responses.js
βΒ Β βββ config
βΒ Β βΒ Β βββ environment
βΒ Β βΒ Β βΒ Β βββ development.js
βΒ Β βΒ Β βΒ Β βββ index.js
βΒ Β βΒ Β βΒ Β βββ production.js
βΒ Β βΒ Β βΒ Β βββ shared.js
βΒ Β βΒ Β βΒ Β βββ test.js
βΒ Β βΒ Β βββ express.js
βΒ Β βΒ Β βββ local.env.sample.js
βΒ Β βΒ Β βββ socketio.js
βΒ Β βββ index.js
βΒ Β βββ routes.js
βΒ Β βββ sqldb
βΒ Β βββ config.js
βΒ Β βββ index.js
βΒ Β βββ migrations
βΒ Β βΒ Β βββ ...
βΒ Β βββ seeders
βΒ Β βββ ...
βββ yarn.lock
32 directories, 81 files
-
Run
npm install
to install server dependencies. -
Edit the
./server/config/development.js
file and enter the correct postgres DB connection variables. -
Run
npm run dev
to start the development server.
Migrations and seeds are placed in ./server/sqldb/migrations
and ./server/sqldb/seeders
respectively.
To run all pending migrations, run the following command:
npm run migrate
To reverse all migrations:
npm run migrate:undo
More about Sequelize Migrations
To run all seeds, run the following command:
npm run seed
To reverse all seeds:
npm run seed:undo
More about Sequelize Seeds
TODO: Add tests w. mocha vs. jest... Running
npm test
will run the unit tests with karma.