Skip to content

leogoesger/eflow-node-api

Repository files navigation

eflow-api

Build Status Coverage Status

Getting Started

  1. Install Postgres(create db eflow_production)
  2. Install Redis
  3. Add .env file
  4. yarn start / production
  5. redis-cli flushall
  6. yarn run dev-prepare / prod-prepare
  7. /api/renewClasses

Testing

Simply run yarn test and all your tests in the test/ directory will be run.

CI

It uses Travis-CI and Coveralls.

Sequelize CLI

$ npm install -g sequelize-cli            

$ sequelize model:create --name TodoItem --attributes content:string,complete:boolean #Generate a model

Help

For more information on all the things you can do with Sequelize CLI visit sequelize cli .

Deployment

The API, Func Flow API, and client are all deployed behind Nginx. Their Nginx configuration files are located in the sites-available and sites-enabled directories within the Nginx configuration.

API and Func Flow API are running via PM2. You could check on the status via node_PM2 list to get a list of APIs that are running.

To deploy node_api

# cd into node_api folder
npm run pm2:production

To deploy func flow api

# not sure if this is necessary
eflow_venv 
# cd into the func flow folder
func_flow_pm2 start ecosystem.json

License

Copyright (c) 2018

Licensed under the MIT license.

About

UC Davis Water Management Lab eflow API

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages