3.1.2 • Published 8 months ago
@tobshub/tobspress v3.1.2
Tobspress - build nodejs HTTP REST APIs
Installation
yarn add @tobshub/tobspress
OR
npm i @tobshub/tobspress
Usage
A simple example is available here.
Create a new instance of Tobspress
import Tobspress from "@tobshub/tobspress";
const app = new Tobspress();
app.listen(4000);
The Tobspress
instance exposes method that will be familiar if you have used a similar library.
Examples
import Tobspress, {TobspressRouter} from "@tobshub/tobspress";
// existing code
const helloRouter = new TobspressRouter();
helloRouter.get("/world", (req, res) => {
res.send("hello world");
});
app.use("/hello", {
router: helloRouter,
handler: (req, res) => {
res.send("hello");
}
});
app.use("/", (req, res) => {
res.sendFile("public/index.html");
});
// existing code
3.1.2
8 months ago
3.1.1
8 months ago
3.1.0
9 months ago
3.0.0
11 months ago
2.7.0
11 months ago
2.6.1
11 months ago
2.5.0
11 months ago
2.6.0
11 months ago
2.3.0
1 year ago
2.2.1
1 year ago
2.2.0
1 year ago
2.4.0
11 months ago
2.3.1
12 months ago
2.1.4
1 year ago
2.1.3
1 year ago
2.1.2
1 year ago
2.1.1
1 year ago
2.1.0
1 year ago
2.0.0
1 year ago
1.2.2
1 year ago
1.2.1
1 year ago
1.2.0
1 year ago
1.1.0
1 year ago
1.0.0
1 year ago