Lambda function icon
A gradient border

Serverless functions

Deploy server-side code without managing infrastructure. API endpoints that scale automatically, integrate with third-party services, and run globally with zero maintenance.

Transparent lines
import express from 'express'
import { Request, Response } from 'express'

export default (req: Request, res: Response) => {
  if (req.method !== 'POST') {
    return res.status(405).send('Method not allowed')
  }

  try {
    const { amount, currency, customerEmail } = req.body
    // Process payment logic here

    res.status(200).json({
      success: true,
      message: 'Payment processed successfully'
    })
  } catch (error) {
    res.status(500).json({
      success: false,
      message: error.message
    })
  }
}

Scale automatically

Functions at scale

Deploy server-side logic without managing infrastructure. Handle custom business logic, integrate with third-party services, and build webhooks with JavaScript or TypeScript.

Explore the docs
Transparent lines
import nodemailer from 'nodemailer'

export default async (req, res) => {
  let transporter = nodemailer.createTransport({
    host: process.env.SMTP_HOST,
    port: process.env.SMTP_PORT,
    secure: true,
    auth: {
      user: process.env.SMTP_USER,
      pass: process.env.SMTP_PASS,
    }
  })

  let info = await transporter.sendMail({
    from: '"Fred Foo 👻" <foo@example.com>',
    to: 'bar@example.com, baz@example.com',
    subject: 'Hello ✔',
    text: 'Hello world?',
    html: '<b>Hello world?</b>'
  })

  res.json('Message sent')
}

Automatic scaling

Functions scale automatically based on demand, no infrastructure management needed

TypeScript support

Write functions in TypeScript with full type safety and modern JavaScript features

Dashed lines

Advanced features

Powerful backend logic, zero complexity

Create server-side functionality for your applications without the complexity of managing servers, libraries, or runtime environments.

Transparent lines
Nhost Logo in a dark circle

Nhost

Build apps users love

Start building
Code

Environment variables

Securely store and access configuration values and secrets. Full access to both system and custom environment variables for safe credential management.

TypeScript

TypeScript support

Write functions in TypeScript with full type checking and modern JavaScript features. Get increased productivity with better IDE support and fewer runtime errors.

Event triggers icon

Event triggers

React to database changes automatically by consuming event triggers. Perfect for notifications, data processing, and maintaining data consistency across systems.

Zero maintenance icon

Zero maintenance

No servers to manage, no scaling to configure, no OS updates to apply. Functions are automatically scaled, secured, and maintained for you, so you can focus on your code.

Logs icon

Comprehensive logging

Monitor function performance and troubleshoot issues with detailed execution logs. Get insights into function execution time, memory usage, and errors.

Glowing logo of Nhost

Start building your next big thing

Get a complete backend up and running in minutes. Focus on building features your users will love, not wrestling with infrastructure. No credit card required for the free tier.

Join thousands of developers shipping faster with Nhost