- nodejs > 6.0
npm install -g tedious sequelize sequelize-cli
Create a new file in the root of the project called .env
Create this on both Development and Production
// PlanGid API Key
PLANGRID_KEY='<your plangrid api here>'
// Development envirnoment setup
DEV_USERNAME='<dev username>'
DEV_PASSWORD='<dev password>'
DEV_DATABASE='<Plangrid-dev>'
// Production envirnoment
PROD_USERNAME='<sql username created above>'
PROD_PASSWORD='<sql password created above>'
PROD_HOST='<sql server hostname>'
PROD_INSTANCE='<sql server instance>'
PROD_DATABASE='<Plangrid>'
// Syslog Server
SYSLOG_SERVER='<ip address or hostname>'
Using Postgres for local development testing and Microsoft SQL in production.
- Create a new Postgres database on your local machine called Plangrid-dev and make the Owner the current user.
- Create a new database on your MSSQL Server called Plangrid or use your existing data mart
- Create a new SQL user and make it the dbo for both databases.
sequelize db:migrate --env=development
sequelize db:migrate --env=production
NODE_ENV=production nodejs app.js
or (if using PM2)
NODE_ENV=production pm2 start app.js
Additional field we use to track our projects internally. All PlanGrid projects start with the job number as the prefix. Update file controllers/projects line#19. Reference here to learn more about substring.