1.1.3 • Published 9 years ago
brocoli v1.1.3
Brocoli - REST API Template
Brocoli is a REST API template based on the Express framework.
Setup
Install with git
Clone the repository
git clone https://github.com/CBinet/Brocoli.gitInstall dependencies
npm installLaunch the application
npm startInstall with npm
Download the npm module
npm install brocoliExtract the brocoli module into the current folder then : Launch the application
npm startUsing Brocoli
Once the server is started, you can access it at http://localhost:8000/. If the server is running, you should get the following message :
Brocoli is alive :)Adding routes example
If you want to add another route, simply add this block of code in your server.py file :
// ...
app.get('/new-route', function (req, res) {
res.send('I am the new route.');
});To do a POST, PUT, DELETE, etc, simply change app.get for the desired option.