@prop_c/node-server
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

A simple node server

How to use it

import { NodeServer } from "@prop_c/node-server";
const app = new NodeServer();
app.get("/", (req, res) => {
  res.send("Hello World");
});

app.post("/post-route", (req, res) => {
  const body = req.body;
  res.status(200).json({
    message: "Hello World",
  });
});

app.listen(3000, () => {
  console.log("Server running on port 3000");
});

/@prop_c/node-server/

    Package Sidebar

    Install

    npm i @prop_c/node-server

    Weekly Downloads

    0

    Version

    1.0.7

    License

    ISC

    Unpacked Size

    7.77 kB

    Total Files

    9

    Last publish

    Collaborators

    • prop_c