GitXplorerGitXplorer
r

tokio-rest

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
410fb3b259ec52082cf4d754a46870930b186b1b

Updated README

jjorgemsrs committed 8 years ago
Unverified
01d3338975510cdadacfeea26f1829deb4986a3c

Updated README.md

jjorgemsrs committed 8 years ago
Unverified
3ff732f0ce5462644eceb7146811679c423866d9

WFH

jjorgemsrs committed 8 years ago
Unverified
feb2a13a1888dfe845f301cc7aa52a879777b46f

Add missing dependencies to package.json

jjorgemsrs committed 8 years ago
Unverified
33b73da66231a70929f10e31258227ed4d19f268

Add more comments to server

jjorgemsrs committed 8 years ago
Unverified
9868795d5c66001ebacd2c54a9f61936babf9821

Simplify plugin example

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