petergombos / barflow-api

RESTful Node.js based API

Home Page:http://bit.ly/BarFlowApi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BarFlow API

Overview

This api is built to support our mobile and web applications. It is developed by the following swagger specification: Documentation

Getting Started

Clone the repo:

git clone https://github.com/BarFlow/api.git
cd api

Install dependencies:

npm install

Start server:

# set DEBUG env variable to get debug logs
DEBUG=barflow-api:* npm start
# OR
# requires gulp to be installed globally
npm i -g gulp
gulp serve

Execute tests:

# compile with babel and run tests
npm test (or gulp mocha)

# use --code-coverage-reporter text to get code coverage for each file
gulp mocha --code-coverage-reporter text

Other gulp tasks:

# Wipe out dist and coverage directory
gulp clean

# Lint code with ESLint
gulp lint

# Default task: Wipes out dist and coverage directory. Compiles using babel.
gulp

API logging

Logs detailed info about each api request to console during development.

Error logging

Logs stacktrace of error to console along with other details.

Code Coverage

Get code coverage summary on executing npm test

npm test also generates HTML code coverage report in coverage/ directory. Open lcov-report/index.html to view it.

Meta

Project is based on Kunal Kapadia's @kunalkapadia12 express-mongoose-es6-rest-api

About

RESTful Node.js based API

http://bit.ly/BarFlowApi

License:Apache License 2.0


Languages

Language:JavaScript 100.0%