Skip to content

chartera/regserv

Repository files navigation

regserv

Status:Under Development
Location:http://github.com/chartera/nodemicro
Version:0.0.1/2

1 Description

regserv is a nodejs single/multi process microservice for account management.

2 Dependencies

2.1 Databases

Configuration under .env.

  • redis
  • postgresql
  • couchdb

2.2 Dynamic libraries

  • zmq

3 Install and running

For mutli process usage set singleMode = false in .env. (See under the benchmark folder some benchmarks).

$ cd regserv
$ npm install
# install all dependencies in subfolders
$ npm run dev

3.1 Supervisor

A supervisor-like wrapper on startup.js for reloading in dev mode.

4 Apis

4.1 Registration

The registraion process starting with an json post request. By successful request the return value is a unique code, which is needed for a validation request. The validation request is only one time valid, if successful, the return value is a token. This token is needen to set a password in order to complete the registration.

$ curl -H "Content-Type: application/json" -X POST -d '{"email":"[email protected]"}' http://localhost:4445/api/v1/registration
$ curl http://localhost:4445/api/v1/invitation_token/<codoe>

5 Todos

5.1 architecture

  • circuit breaker pattern

5.2 technical

  • zmq as static library.
  • sqlite instead postgresql.
  • pouchdb-server instead couchdb.
  • code cleaning

5.3 features

  • complete registraion
  • email confirmation request
  • session login/logout
  • client part for include in a spa
  • startup.js without reloding in production
  • nodedaemon

6 Bugs

  • ipc channels stucks sometimes in mutli process mode

Releases

No releases published

Packages

No packages published