0.2.0 • Published 4 years ago

@15ms/server v0.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

15ms-server

Build Status Coverage Status

A secure extensible single-owner API server.

Getting Started

GET for guest access. POST for owner access.

The owner access should be validated and identified.

Usage

npm install --save @15ms/server
const { Server } = require('@15ms/server');

const server = new Server({
  secure: {
    secret: 'your-secret'
  },
  applications: [
    { route: 'your-application-name', entry: 'entry-path-of-module' }
  ]
});

server.listen(8080);
curl http://localhost:8080/your-application-name/your-api-path
curl -X POST http://localhost:8080/your-application-name/your-api-path?hash=...

# also you can use @15ms/client to send request