JSPM

  • Created
  • Published
  • Downloads 30
  • Score
    100M100P100Q75409F
  • License Apache-2.0

An event driven serverless framework

Package Exports

  • @stackpress/ingest
  • @stackpress/ingest/dist/Router
  • @stackpress/ingest/dist/Router.js
  • @stackpress/ingest/dist/Server
  • @stackpress/ingest/dist/Server.js
  • @stackpress/ingest/dist/helpers
  • @stackpress/ingest/dist/helpers.js
  • @stackpress/ingest/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stackpress/ingest) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ᗊ 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');
};