$ npm install -g restify-gen
The quickest way to get started with restify-gen is to utilize the executable restify-gen
to generate an api application as shown below:
Create the app:
$ restify-gen myappfolder
Install dependencies:
$ cd myappfolder
$ npm install
Start your app at http://localhost:8080/
:
$ npm start
This generator can also be further configured with the following command line flags.
Usage: restify-gen [options] applicationfolder
Options:
-V, --version output the version number
-n, --appname <appname> api application name (default <applicationfolder>)
-d, --appdescription <appdescription> api application description (default My API Description)
-v, --apiversion <apiversion> api version (default 1.0.0)
-p, --port <port> api port (default 8080)
-c, --clustered include cluster application file (clustered.js)
-f, --force clear contents of the application folder if exists
-h, --help output usage information