GitXplorerGitXplorer
r

tokio-rest

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
0b08386a72dbbd7acf544baff32a97a49dceccf0

Improve examples

jjorgemsrs committed 8 years ago
Unverified
8ba10648f99d616f6983536170cc1cc3feed5e37

Upgrade tokio-core from 0.0.2 to 0.0.3

jjorgemsrs committed 8 years ago
Unverified
046d16cc0fefbe5faac5ade919b9cc34ab2f8506

Fixed middleware order

jjorgemsrs committed 8 years ago
Unverified
78e4ecbe704d17e1264c07675bcae1db1bc427cf

Update README.md

jjorgemsrs committed 8 years ago
Unverified
23e0dc61a17ced6e7f6a5f25a3cf3d1ba32eb7b7

Update Hello World section in README.md

jjorgemsrs committed 8 years ago
Unverified
944cb8f2b47cdbef30ee7117a6ec0fc04430276d

Update tokio-core from 0.0.1 to 0.0.2

jjorgemsrs committed 8 years ago

README

The README file for this repository.

Build status NPM version Test coverage

Opinionated, light-weight HTTP container for node.js. It brings a design by contract approach to Web API development.

Makes Web APIs arguably cheaper to write by allowing developers to focus on the business logic instead of non-functional requirements.

Installation

$ npm install -g tokio-rest

tokio-rest is supported in node v6+.

Hello World

Create a NPM module

$ mkdir hello-tokio
$ cd hello-tokio
$ npm init -y

Create an index.js file

const myProgram = {
  $do() {
    return 'Hello World!';
  }
};

module.exports = function myProgramFactory() {
  return myProgram;
}

Save it and, in your project folder, run

$ tokio-rest -m .

Point your browser to http://localhost:8080.

Run

$ tokio-rest -m path_to_your_module

With restart on change

Install a process supervisor, e.g. nodemon

$ npm i -g nodemon

Run with supervisor, e.g. nodemon

$ nodemon -w path_to_your_module tokio-rest -m path_to_your_module

Learn more

TODO

Acknowledgements

This project is the result of the collaborative work of

  • fernandesh
  • mirandal
  • bacelarh
  • soaresp
  • henriquesj

License

MIT