restate is a simple framework aiding the creation of REST-based nodejs applications.
Just a quick generator for projects using technologies: connect, jade, less and connect-rest.
Generates everything you need: build files, ready-to-serve server code, project folder structure, basic deployment stage-levels
$ npm install -g restate
Step into a folder where you want to create your new project folder and execute the following from command line:
$ restate projectName [--preserveFiles] [--noAA] [--noREST] [--noMongo] [--noKO]
This will create the project structure and scripts for it allowing you to build into 2 different stages: development and production.
restate finishes in an instant and you are ready to go! (have a running local mongo!)
$ ./buildDevelopment.sh
And open browser:
http://localhost:8080/
Done. :)
--preserveFiles
Will try not to override any existing files.
--noAA
Removes the built-in A&A tempalte code from the server-side.
--noREST
Removes the built-in RESTful tempalte code from the server-side.
--noMongo
Removes the built-in MongoDB tempalte code from the services-side
--noKO
Removes the built-in Knockout.js tempalte code from the client-side
.gitignore --- usual
buildDevelopment.sh --- shorthand for gruntRun.sh
buildProduction.sh --- shorthand for gruntRun.sh
config/ --- json config files configuring server and db connectivity
Gruntfile.js --- grunt file and plugins
gruntRun.sh --- runs grunt with a parameter specifying the stage level
package.json --- usual
server/ --- js files of the server. RESTful services, connect server, A&A services, Mongo connectivity
web/ --- dynamic web files
less/ --- folder for less files
js/ --- folder for the js files
lib/ --- folder for the external js files
views/ --- folder for the jade files
www/ --- static files' folder
Every build will be put into the created 'dist' folder.
Feel free to add requests to extend the capabilities of this utility!