1.0.16 • Published 4 years ago

@microserv/core v1.0.16

Weekly downloads
11
License
MIT
Repository
github
Last release
4 years ago

title: 'Getting Started'

custom_edit_url: https://github.com/iamvishnusankar/microserv/edit/master/README.md

MicroServ is an opinionated micro service framework. MicroServ exist to reduce the boilerplate codes/repetitive programming patterns.

Concept

export default new MicroServ({
  apps: [app1, app2, app3, app3]
})

Installation

yarn install @microserv/core

:::note MicroServ will install all necessary devtools and will generate all config files. You don't need to install anything. :::

Hello World App

1. Write code

import { MicroServ, HelloWorldApp } from '@microserv/core'

export default new MicroServ({
  apps: [new HelloWorldApp()]
})

2. Add scripts to package.json

{
  "scripts": {
    "dev": "microserv develop",
    "start": "NODE_ENV=production microserv start",
    "build": "NODE_ENV=production microserv build"
  }
}

3. Run the code

yarn dev