brocoli
v1.1.3
Published
**Brocoli is a REST API template based on the Express framework.**
Downloads
5
Readme
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.git
Install dependencies
npm install
Launch the application
npm start
Install with npm
Download the npm module
npm install brocoli
Extract the brocoli module into the current folder then : Launch the application
npm start
Using 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.