Skip to content

BukaLelang/bukalelang-backend

Repository files navigation

Backend for Buka Lelang

Build Status

Tech Stack

  • ExpressJS
  • Postgres
  • Sequelize
  • WebSocket using Socket.IO

Testing

  • Mocha
  • Chai

CI

  • Travis

Minimum Requirement

  • node v. 6.9.1
  • Postgres v. 9

Install Guide

$ git clone https://github.com/BukaLelang/bukalelang-backend.git
$ cd bukalelang-backend
$ npm install
$ cp .env.example .env
- firebase config
$ cd config
$ cp serviceAccountKey.json.example serviceAccountKey.json
- get config from admin
$ npm run dev

note :

to run npm run dev, you need nodemon, if you don't have it, install it globally by :

npm install -g nodemon

Usage

Create database on PgAdmin with name bukalelang-db
Create login roles (Optional):
  username: bukalelang,
  password: bukalelang

ON TERMINAL :
$ Sequelize db:migrate
$ Sequelize db:seed:all

to use sequelize command, you need sequelize-cli,

npm install -g sequelize-cli

Generate API Docs - apidocjs

install apidoc
$ npm install apidoc -g
generate api Doc
$ apidoc -e "(node_modules|public)" -o public/docs

Run Test

$ mocha               <- to run all Test
$ mocha test/auth.js  <- to run a test

install mocha globally first, if you don't have it :

npm install -g mocha

Contributor

Build Status

Build Status