All Projects → amaurym → now-middleware

amaurym / now-middleware

Licence: GPL-3.0 license
Chain Express middlewares with Vercel (ex-ZEIT) Now serverless functions.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to now-middleware

static-auth
The most simple way to add Basic Authentication to a static website hosted on Vercel.
Stars: ✭ 25 (+19.05%)
Mutual labels:  now, vercel
notion-custom-domain
📝 Custom domains for your public Notion pages
Stars: ✭ 23 (+9.52%)
Mutual labels:  now, vercel
json-resume-service
JSON resumes as a Service - generate Resumes from the resume.json schema
Stars: ✭ 41 (+95.24%)
Mutual labels:  vercel
now dashboard
▲ZEIT dashboard written in elm
Stars: ✭ 52 (+147.62%)
Mutual labels:  now
website
Official dahliaOS website
Stars: ✭ 29 (+38.1%)
Mutual labels:  vercel
github-readme-twitter
Add Twitter to your github readme
Stars: ✭ 73 (+247.62%)
Mutual labels:  vercel
now-compose
Docker compose for zeit now. [deprecated]
Stars: ✭ 80 (+280.95%)
Mutual labels:  now
wallisconsultancy
Wallis Family Mediation website
Stars: ✭ 37 (+76.19%)
Mutual labels:  vercel
next-portfolio-dev
A portfolio for developers (Next js version)
Stars: ✭ 109 (+419.05%)
Mutual labels:  vercel
bradgarropy.com
🏠 my home on the web
Stars: ✭ 58 (+176.19%)
Mutual labels:  vercel
coincharts
Cryptocurrency Price Chart (GDAX)
Stars: ✭ 75 (+257.14%)
Mutual labels:  now
mojito-admin-starter
此项目主要为了演示如何自动化 Fullstack project 的 Infrastructure。
Stars: ✭ 17 (-19.05%)
Mutual labels:  vercel
fearless
A dashboard scaffolding based on Vue.js 3.x & TypeScript created by Vite.
Stars: ✭ 1,156 (+5404.76%)
Mutual labels:  vercel
Bear-Blog-Engine
Modern blog engine made with Go and the Next.js framework
Stars: ✭ 23 (+9.52%)
Mutual labels:  vercel
nextjs-github-pages
🚀 Deploy a Next.js app to Github Pages via Github Actions.
Stars: ✭ 89 (+323.81%)
Mutual labels:  vercel
the-littoral-line
Email newsletter archive
Stars: ✭ 12 (-42.86%)
Mutual labels:  now
ds-visualizer
This is an ongoing project based on data structures. We will be presenting and explaining the code of each basic data structure with the help of a visualizer.
Stars: ✭ 14 (-33.33%)
Mutual labels:  vercel
next-semantic-ui-react
Next.js + SUIR tiny starter
Stars: ✭ 20 (-4.76%)
Mutual labels:  now
personal-website
Personal website – made with Next.js, Preact, MDX, RMWC, & Vercel
Stars: ✭ 16 (-23.81%)
Mutual labels:  vercel
linear-discord-serverless
Get linear's events forwarded to Discord webhooks through Vercel serverless functions.
Stars: ✭ 47 (+123.81%)
Mutual labels:  vercel

Actions Status npm (scoped) dependencies Status Buy me a tree




now-middleware

Chain Express middlewares with Vercel Serverless Functions.




Installation

yarn add @amaurym/now-middleware

Usage

The package exposes one chain function.

import { chain } from '@amaurym/now-middleware';
import { NowRequest, NowResponse } from '@vercel/node';

// Import a couple of Express middlewares
import cors from 'cors'; // Enable cross-origin resource sharing (CORS) with various options
import morgan from 'morgan'; // HTTP request logger

async function handler(_req: NowRequest, res: NowResponse): Promise<void> {
  // This is your normal ZEIT Now function.
  res.send('Everything OK.');
}

// Chain some middlewares before calling the ZEIT Now serverless function
export default chain(cors(), morgan('common'))(handler);

Learn More

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].