Node.js + MongoDB server used to provide backend API service for Cyann Mobile & Web Application.
Before you proceed, ensure that you have the following installed on your local machine:
- Node.js v6.9.1 LTS (How to install?)
- MongoDB (How to install?)
- npm (How to install?)
- Yarn (optional, alternative to npm) (How to install?)
Having problems installing? Checkout our wiki page!
Clone the repository to your local machine & install all the dependencies
$ git clone https://github.com/Howard-Zhou/Cyann.git
$ cd ./Cyann
$ npm install
If you have Yarn installed, run the following commands instead
$ git clone https://github.com/Howard-Zhou/Cyann.git
$ cd ./Cyann
$ yarn
Before you run the server, start the MongoDB process and run it in the background (default url: localhost:27017)
$ mongod
Now open a new tab in your terminal & run the Node.js server (default url: localhost:8080)
$ npm start
Run the entire test suite (Note: Our tests are written using JavaScript ES6 syntax, hence you need Node.js v6.x.x or higher to get it to work)
$ npm run test
Generate test coverage report with Istanbul
$ npm run coverage
Please refer to the API documentation located in Cyann/doc for details.
If you encounter a bug with Cyann (Backend) we would like to hear about it. Search the existing issues and try to make sure your problem doesn’t already exist before opening a new issue. It’s helpful if you include the version and OS you’re using. Please include a stack trace and reduced repro case when appropriate, too.