Skip to content

Latest commit

 

History

History
73 lines (50 loc) · 1.86 KB

File metadata and controls

73 lines (50 loc) · 1.86 KB

ARASAAC API

These are the docs about how to test & code our API.

If you need to use our API, you should use previous API (we can send you docs through email arasaac@gmail.com)

Ingredients for the API

Server language
nodeJSJavaScript for the server Side
Web Server
Express: Fast, unopinionated, minimalist web framework for Node.js
API Framework
Swagger: World’s largest framework of API developer tools for the OpenAPI Specification(OAS)
Database
MongoDB: a document database (no relational)
Authentication
JWT, user/password and social logins

How to read the API documentation

Add new endpoints

  • Through the swagger editor, using the command line:
cd newarasaac/api
npm run edit

How to debug API using docker

  • We use yarn debug in docker-compose.yml instead of yarn start
  • We open port 9229, both in API docker and in HOST (see docker-compose.yml)
  • Launch Debugger from vscode with this configuration:
{
  "version": "0.2.0",
  "configurations": [
  {
    "type": "node",
    "request": "attach",
    "name": "Docker: Attach to Node",
    "port": 9229,
    "address": "localhost",
    "sourceMaps": true,
    "localRoot": "${workspaceFolder}/app",
    "remoteRoot": "/app",
    "protocol": "inspector"
  }
  ]
}