Giter VIP home page Giter VIP logo

airport-api-dm's Introduction

AIRPORT API PROJECT

Node.js basic project which contains sequelizejs integration along with basic mocha test suits to test RESTFULL API as well as modules of application.

DIRECTORY STRUCTURE

  bin/                contains bash scripts
  config/             contains application configurations
  controllers/        contains Web controllers
  docs/               contains api documentation
  models/             contains sequelizejs model
  public/             contains some basic public assets
  routes/             contains some basic application routes
  services/           contains some basic application services
  tests/              contains various tests for the basic application
  views/              contains view files for the Web application

REQUIREMENTS

The minimum requirement by this project template that your Web server supports Node.js v 0.12.12

INSTALLATION

Install through Vagrant

Follow this link: https://gist.github.com/smali-kazmi/e3e75324dc1b3f80f32a

Please both files into a folder and run following commands

vagrant up
vagrant ssh

after ssh

cd /vagrant/airport-api-dm
npm run start //start node instance
http://localhost:3000/api/all/stats

CONFIGURATION

Database

Edit the file config/config.js with real data, for example:

module.exports = {
  "test": {
    "username": "smak",
    "password": "smak",
    "database": "aiport_api_test",
    "host": "127.0.0.1",
    "dialect": "mysql",
    "logging": console.log,
  },
  "development": {
    "username": "smak",
    "password": "smak",
    "database": "aiport_api_development",
    "host": "127.0.0.1",
    "dialect": "mysql",
    "logging": console.log,
  }
}

DB Dump

No need of it; sequelizejs create tables automatically.

Test Data

In the project folder please run

npm run parse-csv

Routes

  1. GET /api/all/stats
  2. GET /api/:airport_id/stats
  3. GET /api/:airport_id/reviews
  4. GET /api/:airport_id/reviews?overall_rating=[Number]

airport-api-dm's People

Contributors

smali-kazmi 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.