@bravejs/bootstrapper

A Simple Node.js Framework

Usage no npm install needed!

<script type="module">
  import bravejsBootstrapper from 'https://cdn.skypack.dev/@bravejs/bootstrapper';
</script>

README

BraveJS Bootstrapper

This is a simple package to bootstrap new BraveJS application.

Installation

npm i @bravejs/bootstrapper

Usage

Now you have to create a server.js file in root, and .brave.json, and .env

NOTE: You will need nodemon package to start the server.js file

In .env file.

HOST=127.0.0.1
PORT=3333

In your .brave.json file you should have something like that.

{
    "name": "BraveJS",
    "version": "1.0.0",
    "providers": [
        "@bravejs/env/build/providers/EnvServiceProvider"
    ],
    "aliases": [],
    "commandsProviders": []
}

Now let's head to our server.js file

const { HttpServer } = require('.@bravejs/bootstrapper')
const httpServer = new HttpServer(__dirname)

httpServer.start((req, res) => {
    console.log(req)
    res.end()
});

Now you are ready, just try to access 127.0.0.1:3333