ajgenesisnode-sinatra v0.0.2
AjGenesisNode Sinatra
AjGenesisNode Sinatra tasks and templates, to generate web sites based on Sinatra. WIP.
Setup
Install Node.js.
Install globally latests version of AjGenesis for Node, and Sinatra modules:
npm install ajgenesis -g
npm install ajgenesisnode-sinatra -gQuick start
In any directory, create an application
ajgenesis sinatra:create demo
cd demo
npm installThe AjGenesis sinatra module is installed automatically from ajgenesisnode-sinatra, if it is not already installed.
There is a subdirectory ajgenesis containing:
ajgenesis/models: where the free model files resideajgenesis/tasks: tasks to runajgenesis/templates: templates to be usedajgenesis/libs: additional modules used by tasks
Add some entities and propeties:
ajgenesis entity:add customer
ajgenesis entity:addproperty customer name
ajgenesis entity:addproperty customer address
ajgenesis entity:add supplier
ajgenesis entity:addproperty supplier name
ajgenesis entity:addproperty supplier addressThe new .json files will be added to models director.
Generate the site:
ajgenesis generateRun the site
ruby app.rbThe site uses sqlite3 and data-mapper.
TBD: explain dependencies, add gemfile
The site is available in your browser using http://localhost:4567.
Development
npm install -g ajgenesis
git clone git://github.com/ajlopez/AjGenesisNode-Sinatra.git
cd AjGenesisNode-Sinatra
npm link ajgenesis
npm install
npm testVersions
- 0.0.1 Published
- 0.0.2 Published
References
Contribution
Feel free to file issues and submit pull requests � contributions are welcome.
If you submit a pull request, please be sure to add or update corresponding
test cases, and ensure that npm test continues to pass.