@stract/core
TypeScript icon, indicating that this package has built-in type declarations

4.1.4 • Public • Published

Stract

⚡️ Fast node server

Install

  npm install @stract/core

or

  yarn add @stract/core

Minimal setup

import { Stract } from '@stract/core';

const app = new Stract();

app.get('/', async () => ({ foo: 'bar' }));

async function start() {
  try {
    await app.ready();
    const { url } = await app.listen(9001);
    console.log(`Server ready on http://${url}`);
  } catch (error) {
    console.error(error);
  }
}

start();

Readme

Keywords

none

Package Sidebar

Install

npm i @stract/core

Weekly Downloads

0

Version

4.1.4

License

none

Unpacked Size

237 kB

Total Files

30

Last publish

Collaborators

  • mattiasewers