@stackpress/ingest
TypeScript icon, indicating that this package has built-in type declarations

0.3.23 • Public • Published

ᗊ Ingest

NPM Package Tests Status Coverage Status Commits License

An unopinionated, event driven, pluggable, serverless framework.

Install

npm i @stackpress/ingest

Usage

// src/server.ts
import { server } from '@stackpress/ingest/http';

//make a new app
const app = server();
//add a route
app.get('/', function HomePage(req, res) { 
  res.setHTML('Hello, World');
});
//start the server
app.create().listen(3000);

Entry Files

You can route to files as well.

import path from 'node:path';
import { server } from '@stackpress/ingest/http';

//make a new app
const app = server();
//add a route
route.get('/', path.join(__dirname, 'home'));
//start the server
app.create().listen(3000);
// src/home.ts
export default function HomePage(req, res) { 
  res.setHTML('Hello, World');
};

Package Sidebar

Install

npm i @stackpress/ingest

Weekly Downloads

56

Version

0.3.23

License

Apache-2.0

Unpacked Size

112 kB

Total Files

43

Last publish

Collaborators

  • cblanquera