Code Monkey home page Code Monkey logo

backend-next's Introduction

CircleCI

Backend-NEXT

Backend API server for ATLauncher NEXT.

Installation

Before you begin you need to make sure you have NodeJS (4.x) installed on your computer

Clone the repository and run the following commands under your project root:

npm install

Once done you need to run the migrations. In development mode (which is default) the application will use a sqlite database at /db/development.sqlite3.

To run the migrations simply run:

npm run migrate

Once done you can start the development server by running:

npm run dev

Testing

To run the tests simply run the following command:

npm test

This will run npm run test:clean before running the tests which will remove the test database, run the migrations as well as the seeds.

Linting

Please make sure you run all your code through the linter before creating a pull request as all pull requests are automatically checked by the CI process and will cause delays if not linted properly.

To run the linter:

npm run lint

Configuration

All configuration files can be found in the /config folder.

They're divided up into 3 main files:

  • base.json: This file is the very base file and contains configuration that is used in both production and development.
  • test.json: This file contains setting overrides for when in test.
  • development.json: This file contains setting overrides for when in development.
  • production.json: This file contains setting overrides for when in prodution.

Running in production

To run in production you should use some tool such as NodeMon of Forever to keep your server up and running all the time.

First thing you need to do is run the migrations for the production environment:

NODE_ENV=production npm run migrate

This will run the migrations on the defined production database specified in /knexfile.js which by default is set to use MySQL using the credentials in the production config.

Then once ready to run simply run:

NODE_ENV=production npm start

This will compile all the src files with babel and then run the server.

Contributing

If you wish to contribute to this repository in any way, take a look at CONTRIBUTING.md.

backend-next's People

Contributors

ryantheallmighty avatar greenkeeperio-bot avatar

Watchers

James Cloos avatar Ptolemy avatar

Forkers

r3ido101 fossabot

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.