Backend project for CEM
- Working on messages API
- Clone this project:
git clone https://github.com/sunway-team/cem-server.git
cp .env.development .env
npm i
to install dependenciesnpm run migrate:rollback
or/andnpm run migrate:latest
to migrate the servernpm run dev
to start the server- Open the browser and use
GRAPHIQL
to test the apis npm run test
formocha
testnpm run lint
to runeslint
- Start the server:
npm run dev
- Run
npm run doc
to generate documents - Open
doc/index.html
in the browser
- Clone the project:
git clone https://github.com/sunway-team/cem-server
- Go to the project folder:
cd cem-server
- Checkout production branch
git checkout production
(Postponed for now, please stay on master instead if it's newer) - Install dependencies:
npm i
- Create the production .env file:
cp .env.production .env
- Build project:
npm run build
- Run
reset:db:staged
to reset production database and reseed data, if there is any errors then restart the database, remove thecem
database, recreatecem
and run the command again - Open Bucket
- Remove all files inside it and upload:
app.yaml
,package.json
andbuild
folder to the bucket - Open
Gcloud Console
(top right corner of the screen) rm -rf acm-server && mkdir acm-server && gsutil rsync -r gs://acm-server ./acm-server && cd acm-server && gcloud app deploy -q
gcloud app browse
- Production app will be serve at cem-server-production.appspot.com