faster-api-deploy
wrapper over express
$ cnpm install faster-api-deploy 
SYNC missed versions from official npm registry.

faster-api-deploy

wrapper over express

sample code.

const RESTApi = require('faster-api-deploy');
const app = new RESTApi();

app.get("/returnExample", (req, res) => {

    return {
        message: "success"
    }
});

app.get("/hello", (req, res) => {
    res.status(200);

    return {
        message: "success"
    }
});

app.get("/error", async (req, res) => {
    await sleep(300);
    throw "ssssssssssssssssssssssss"
});

app.get("/sleep", async (req, res) => {
    await sleep(300);
    return {message: "hello world"};
});

const sleep = (time) => {
    return new Promise((res, rej) => {
        setTimeout(res, time);
    });
};

// app.startListening(9000, "dev", "REST Api");

// it's picking info from .env file in root
app.startListening();

Current Tags

  • 1.0.33                                ...           latest (3 months ago)

34 Versions

  • 1.0.33                                ...           3 months ago
  • 1.0.32                                ...           8 months ago
  • 1.0.31                                ...           8 months ago
  • 1.0.30                                ...           8 months ago
  • 1.0.29                                ...           8 months ago
  • 1.0.28                                ...           8 months ago
  • 1.0.27                                ...           8 months ago
  • 1.0.26                                ...           8 months ago
  • 1.0.25                                ...           8 months ago
  • 1.0.24                                ...           8 months ago
  • 1.0.23                                ...           10 months ago
  • 1.0.22                                ...           a year ago
  • 1.0.21                                ...           a year ago
  • 1.0.20                                ...           a year ago
  • 1.0.19                                ...           a year ago
  • 1.0.18                                ...           a year ago
  • 1.0.17                                ...           a year ago
  • 1.0.16                                ...           a year ago
  • 1.0.15                                ...           a year ago
  • 1.0.14                                ...           a year ago
  • 1.0.13                                ...           a year ago
  • 1.0.12                                ...           a year ago
  • 1.0.11                                ...           a year ago
  • 1.0.10                                ...           a year ago
  • 1.0.9                                ...           a year ago
  • 1.0.8                                ...           a year ago
  • 1.0.7                                ...           a year ago
  • 1.0.6                                ...           a year ago
  • 1.0.5                                ...           a year ago
  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (15)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |