Serverless Functions for Website (Netlify Functions)

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1170
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1094
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    830
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    879
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    453

Serverless Functions Development for Websites (Netlify Functions)

Netlify Functions are serverless functions running on AWS Lambda under the hood, but deployed automatically with your site. Setup takes minutes: create a file in netlify/functions/, deploy — the function works.

Two Types of Functions

Sync Functions — standard request/response. Support Node.js 18+, Go, Rust. Timeout 10 seconds (free) / 26 seconds (Pro).

Background Functions — for long-running tasks (up to 15 minutes). Return 202 Accepted immediately, execution continues in the background. Filename: *.mts or *-background.ts.

Sync Function Example

File netlify/functions/contact.ts:

import type { Handler, HandlerEvent } from "@netlify/functions";

export const handler: Handler = async (event: HandlerEvent) => {
  if (event.httpMethod !== "POST") {
    return { statusCode: 405, body: "Method Not Allowed" };
  }

  const data = JSON.parse(event.body || "{}");
  const { name, email, message } = data;

  // Send via Netlify Email Integration or external API
  await fetch("https://api.sendgrid.com/v3/mail/send", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.SENDGRID_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      personalizations: [{ to: [{ email: "[email protected]" }] }],
      from: { email: "[email protected]" },
      subject: `Message from ${name}`,
      content: [{ type: "text/plain", value: `${name} (${email}): ${message}` }],
    }),
  });

  return {
    statusCode: 200,
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ ok: true }),
  };
};

The function is available at /.netlify/functions/contact or via redirect in netlify.toml:

[[redirects]]
  from = "/api/contact"
  to = "/.netlify/functions/contact"
  status = 200

Background Function for Reports

// netlify/functions/generate-report-background.ts
import type { BackgroundHandler } from "@netlify/functions";

export const handler: BackgroundHandler = async (event) => {
  const { reportId } = JSON.parse(event.body || "{}");

  // Long operation: generate PDF, process data
  const pdf = await generatePDFReport(reportId);

  // Save to S3 and notify user
  await uploadToS3(pdf, `reports/${reportId}.pdf`);
  await notifyUser(reportId);
};

netlify.toml

[build]
  command = "npm run build"
  publish = "dist"
  functions = "netlify/functions"

[functions]
  node_bundler = "esbuild"
  included_files = ["templates/**"]

[dev]
  command = "npm run dev"
  port = 8888

node_bundler = "esbuild" speeds up builds and reduces bundle size compared to zip archives.

Environment Variables

Netlify Dashboard → Site Settings → Environment variables. For local development — .env file:

SENDGRID_API_KEY=SG.xxx
DATABASE_URL=postgresql://...

Netlify CLI picks up .env when running netlify dev.

Netlify Forms as Alternative

For simple contact forms, Netlify offers built-in handling without writing a function:

<form name="contact" method="POST" data-netlify="true">
  <input type="hidden" name="form-name" value="contact" />
  <!-- form fields -->
</form>

Netlify automatically accepts submissions, stores them in the dashboard, and sends notifications. Free up to 100 submissions per month.

Timeframe

Basic functions (form, webhook) with redirect configuration — 1–2 days.