Github

-
Create new project
Terminal window bun init -y -
Install s42-core:
Terminal window bun add s42-core -
Create your first microservice
import { Server, RouteControllers, Controller } from 's42-core'const server = new Server()const myTestController = new Controller('*', '/test', async (req, res) => {res.json({ test: 'test' })})await server.start({port: parseInt(String(process?.env?.PORT ?? 4555), 10),clustering: true,idleTimeout: 30,maxRequestBodySize: 1024 * 1024 * 10,development: true,awaitForCluster: true,RouteControllers: new RouteControllers([myTestController]),}) -
Run your project
Terminal window bun app.js
Created for: Bun Features: Faster & Easy Modules: Cluster, Server, MongoDB, SQLIte, RedisDB Version: 2.0.0
Telegram