Nitric supports existing web app and API frameworks, including Express, Koa, Fastify and many more. The http resource allows you to connect Nitric to your existing applications. When deployed, this resource deploys a unique HTTP API Gateway in your chosen cloud provider and routes all incoming requests to your HTTP application.

Enabling HTTP framework support

HTTP framework support is currently in Preview. To enable it in your project add the following to your nitric.yaml file

  - http

Connecting existing frameworks

Here are some examples of how to connect your existing API frameworks with Nitric:

import { http } from '@nitric/sdk'
import express from 'express'

const app = express()

app.use('/hello', (req, res) => {
  res.send('hello from express')