/ossu-api

:back: :end: Open Source Society University API server

Primary LanguageJavaScriptMIT LicenseMIT

OSSU API

Open Source Society University API server

Contribute

How to contribute to Open Source Society University API server

Thank you for your interest in contributing!

Project Structure

  • /api/ - Main API routes
  • /auth/ - Auth API
  • /models/ - Mongoose models
  • /controllers/ - API controllers
  • /helpers/ - Helper functions
  • /helpers/server.js - Express.js server definition
  • /helpers/loader.js - Require's all the modules in a folder
  • /test/api - API tests
  • /test/models - Model tests

See the API documentation.

Installation

Install Prerequisites

Clone the repository

$ git clone git@github.com:open-source-society/ossu-api.git

Configure Environment

Rename the file .envsample as .env. Edit the values according to your environment.

Install the dependencies (via NPM)

$ npm install

Running Server

Start MongoDB

$ mongod

Start server

$ npm start

Hit endpoint

$ curl localhost:$PORT/api/users

Running Tests

Run all tests

$ npm test

Run SemiStandard style checks

$ npm run check-style