Backend project for CEM
- Working on messages API
- Clone this project:
git clone https://github.com/sunway-team/cem-server.git cp .env.development .envnpm ito install dependenciesnpm run migrate:rollbackor/andnpm run migrate:latestto migrate the servernpm run devto start the server- Open the browser and use
GRAPHIQLto test the apis npm run testformochatestnpm run lintto runeslint
- Start the server:
npm run dev - Run
npm run docto generate documents - Open
doc/index.htmlin 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:stagedto reset production database and reseed data, if there is any errors then restart the database, remove thecemdatabase, recreatecemand run the command again - Open Bucket
- Remove all files inside it and upload:
app.yaml,package.jsonandbuildfolder 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 -qgcloud app browse- Production app will be serve at cem-server-production.appspot.com