Our Serverless library supports all of Mockoon's features: dynamic templating, response rules, proxy mode, etc.
View all featuresDeploy lighting fast mock servers in your serverless environment with a simple and easy-to-use NPM package.
How to use itDeploy a cloud function compatible with any provider: AWS Lambda, GCP Functions, Firebase Functions, etc.
See code samples$ npm install @mockoon/serverless
Copyconst mockoon = require('@mockoon/serverless'); const mockEnv = require('./mockoon-datafile.json'); const mockoonServerless = new mockoon.MockoonServerless(mockEnv); module.exports.handler = mockoonServerless.awsHandler();
Copyimport * as functions from 'firebase-functions'; import { MockoonServerless } from '@mockoon/serverless'; const mockEnv = require('./mockoon-datafile.json'); const app = new MockoonServerless(mockEnv); exports.app = functions.https.onRequest(app);