express-api-bootstrap
Create API service extremely fast
Straightforward
Less api, less complexity. Everything you see is what you get. Code intelliSense powered by ts & vscode
Conventional
Configuration is optional. Just coding for your business logic is not a dream
Completed
Reload on demand in dev mode; Production mode compilation; Debuggable; Testable;
express-api-bootstrap
makes it easy to create stand-alone, production-grade express based Applications that you can just run
.
# Quick Start
Create your first API server in 1mins 15secs
# Setup Environment
# create a new directory for your app
mkdir test-boot-app
cd test-boot-app
# Generate package.json without any question
npm init -y
# add required dependencies use yarn
yarn add express-api-bootstrap
# add required dependencies use npm
npm i express-api-bootstrap --save
# init express-api-bootstrap required env
npx boot init
Open and modify package.json
with following section:
{
"scripts": {
"start": "boot dev",
"build": "boot build",
"serve": "boot serve",
"test": "boot test"
}
}
Create the first controller at src/controllers/helloController.ts
with following code:
import { HttpRequest, RestController, GetMapping } from 'express-api-bootstrap'
@RestController()
class HelloControler {
@GetMapping('/hello')
sayHello(req: HttpRequest) {
return {
say: `Hi, ${req.query.name}`
}
}
}
export default HelloControler
Run yarn start
to, and you will see the first API at http://localhost:8080/apis/hello
# Want to contribute?
see contributing