An open API service indexing awesome lists of open source software.

https://github.com/aershov24/appy

Appy web service
https://github.com/aershov24/appy

Last synced: 4 days ago
JSON representation

Appy web service

Awesome Lists containing this project

README

          

Appy Web Service

## Description
Appy Web Service uses the following modules and tools:

Dependencies:
* Express as HTTP server
* Winston as Logging
* jsonwebtoken as JSON Web Token implementation

Dev dependencies are:
* APIDoc as Inline documentation tool
* nodemon as script changing monitor

## Installation
Run the following commands:
```
git clone https://github.com/aershov24/appy.git
cd appy
npm install
npm run nodemon
```

## Rest API inline documentation
The template uses APIdoc tool to create inline documentation for RESTful web APIs.
Use the following commented code as an example for your API methods documentation:
```
/**
* @api {post} /api/authentification User authentification
* @apiName Authentification
* @apiGroup Authentification
*
* @apiParam {Object} details Login details
* @apiParamExample {json} Request-Example:
* {
* "name" : "aershov24@gmail.com",
* "password" : "demo"
* }
* @apiSuccess {Object} object User token object or error message
* @apiSuccessExample {json} Sucess-Response:
* {
* "success": true,
* "message": "User authentificated",
* "token": "eyJ0eXAiOiJKV1QiLCJhbGc"
* }
* @apiError {Object} 403 Failed authentification info
* @apiErrorExample {json} Error-Response:
* {
* "success": false,
* "message": "Authentication failed. Wrong password."
* }
*/
```
See more about ApiDoc [here](http://apidocjs.com/)

## Create ApiDoc Documentation
Run the following commands:
```
npm run apidoc
```