brocoli

Brocoli is a REST API template based on the Express framework.

Usage no npm install needed!

<script type="module">
  import brocoli from 'https://cdn.skypack.dev/brocoli';
</script>

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.