Code Monkey home page Code Monkey logo

differ-canvas's Introduction

README

This README would document whatever steps are necessary to get the application up and running.

  • Node.js Canvas Integration API (API)
  • 1.0.0

How to Configure and Run

Dependencies

* Node.js (8.2.1)
* npm (5.3.0)
* Mongodb (3.4.6)

* mocha (3.5.0)

Configuration

Make configuration changes in app/config/config.js (development, test, production)
    HOST
    PORT
    MONGODB_URL

Setup

Environment variables:
    NODE_ENV (development*, test, production)
    HOST
    PORT

    Note, * marks as default.


Available commands
    npm install - in the project directory to set up dependencies.
    npm start (node ./bin/www) - run the node server.

    *Command example to run: NODE_ENV=production node ./bin/www

Development

Local .env file

.env file is used to keep local environmental variables specific to each user.
Used in dev mode by different developers. It helps to specify your own env variables without 
 changing config dev env. Please, create .env file under projects root directory with the example content:
 - developer should define his/her own .env with specific env variables.

module.exports = {
    HOST: '185.13.197.228',
    PORT: '443',
    ....
};

Testing

Unit test

Setup:
    a) Update package.json -> scripts -> test, set to test/unit/models
    b) Update globals (token) in test/unit/models/helper.js
Run: npm test

Integration test

Setup:
    a) Update package.json -> scripts -> test, set to test/integration/routes
    b) Update globals in test/integration/routes/helper.js
    c) Drop your integration test database
    d) Run server (env test)
Run: npm test

Swagger

Endpoint

Protocol://Ip:Port/api-docs. (ex. - http://146.185.149.49:3000/api-docs). This will load the default example.
Loaded page should have an input filed. Use Protocol://Ip:Port/api/v1/swagger.json to get the API's.
(ex. http://146.185.149.49:3000/api/v1/swagger.json)

Resources

Default

POST              /api/v1/link-account
POST              /api/v1/import
GET               /api/v1/courses

differ-canvas's People

Contributors

alberthambardzumyan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.