Major parts of this project are currently being developed on the MEAN.io framework but we have added support for PostgreSQL. Documentation for MEAN.io can be found in the [MEAN.io doc directory] (http://mean.io/#!/docs) as well as the results of our first challenge PEAN.io prototype - MEAN with PostgreSQL support which should help you set up your environment as well as standup a Heroku instance.
This core uses the following modules in addition to the mean.io framework to support PostgreSQL.
The following additions have been made to the default MEAN.io package.json to include the above dependencies
"pg": "^3.4.1",
"sequelize": "^1.7.9",
This should be supper simple to get up and running. Please only use this method in testing and when working on front end changes.
git clone https://github.com/topcoderinc/serenity-core.git
grunt
defaults to development you can copy config/env/development.js to local.js and modify to connect to you local database. You should always do this when you start developing so the DEADWOOD (see below) schema is not disturbedFor your convenience we have pre-configured the development config files with actual live databases hosted via Heroku. We are collective referring to these two databases as Deadwood. This is the wild west so be careful.
So you should be able to run npm install
followed by grunt
and see a live app with real data. Please keep in mind you still need PostgreSQL
installed localy to run the app, since the npm install of pg will look for local pg bindings. The Deadwood databases are considered the wild west, and should be used at your own risk. If you are working
on a challenge that does NOT alter the model (i.e. a UI challenge) you are welcome to use Deadwood. However if you are working on a challenge that needs to alter either database you should switch to local dbs.
The NODE_ENV
var defines which database you use. We have added config/env/local.js
to the gitignore so if you create this file it wont be commited and you can secure you local db credentials. To switch to local do the following:
config/env/development.js
to config/env/local.js
.grunt dbmigrate
grunt local
and start your app.To help keep databases in sync, please refer to the instructions in docs/db-migrate.md
Any changes to the schema must have a migration file.