Skip to content

Welcome to S42- Core

Start building the next generation of backend solutions with s42-core! Modular, scalable, and optimized for modern architectures, s42-core is your ultimate toolkit for backend development.
  1. Create new project

    Terminal window
    bun init -y
  2. Install s42-core:

    Terminal window
    bun add s42-core
  3. 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
    ]),
    })
  4. Run your project

    Terminal window
    bun app.js
Created for: Bun Features: Faster & Easy Modules: Cluster, Server, MongoDB, SQLIte, RedisDB Version: 2.0.0