Skip to content

NoxuNote/MyNotesAPI

Repository files navigation

MyNotesAPI

The public notes 'crud' REST API.

Overview

This server was generated by the swagger-codegen project and uses the swagger-tools library as an interpreter for OpenAPI3 specification.
Furthermore, it uses Sequelize as ORM to facilitate PostgreSQL write operations.
The project is a part of the NotesCloud repository which gives a full Dockerized environment which includes the authentication proxy.

Authentication

Authentication is assumed to be done by a reverse-prooxy that replaces an authorization token in cookie emited by the user with a X-OAPI-User-Id header which is a proof that the user is authenticated.

The X-OAPI-User-Id header contains the user UUID.

Running the server

To run the server, clone NotesCloud and follow the instructions

Environment variables

  • ENV - prod | dev - (default : prod) dev mode is for testing purpose only. Enables the GET /reset endpoint (which completely clears the DB tables) and might reset the database upon start.
  • PORT - The port MyNotesApi listens to
  • DB_HOST - PostgreSQL access
  • DB_PORT - PostgreSQL access
  • DB_USER - PostgreSQL access
  • DB_PASSWORD - PostgreSQL access
  • DB_DB - PostgreSQL default Database to create tables (the same as Kratos if possible)

Running tests

// TODO : Need to fix !! Run the server in test mode (uses environment.test.json)

npm run test

Run cypress e2e tests

npm run testui

About

The main NoxuNote public REST API

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •