serverlessplus / js

Licence: Apache-2.0 license
serverless your express/koa/restify apps

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to js

Apollo Server
🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.
Stars: ✭ 12,145 (+57733.33%)
Mutual labels:  koa, restify
scf-headless-chrome
Headless chrome running on tencent serverless cloud function.
Stars: ✭ 28 (+33.33%)
Mutual labels:  scf, tencent-cloud
teapot
Utilities for working with HTTP status codes, errors, and more
Stars: ✭ 14 (-33.33%)
Mutual labels:  koa
koa-whistle
This package is no longer maintained(该模块不再维护)
Stars: ✭ 11 (-47.62%)
Mutual labels:  koa
numvalidate
Phone number validation REST API
Stars: ✭ 54 (+157.14%)
Mutual labels:  koa
bunjil
A GraphQL bastion server with schema merging, authentication and authorization with Policy Based Access Control
Stars: ✭ 25 (+19.05%)
Mutual labels:  koa
chatroom
💬chat
Stars: ✭ 56 (+166.67%)
Mutual labels:  koa
Javascript Boilerplate
Node.js+Koa.js+PostgreSQL+React.js+Webpack+Mocha+Makefile, a starter kit for new apps
Stars: ✭ 253 (+1104.76%)
Mutual labels:  koa
WebAppReader
基于 html5 、 Vue.js 、 Koa、Node.js 以及 EJS 的手机小说阅读器。使用 node.js 模拟后台数据,无实际后台,完全的前后端分离开发。
Stars: ✭ 15 (-28.57%)
Mutual labels:  koa
movies-dynamodb-lambda
Simple Serverless API in Node.JS with AWS Lambda, DynamoDB & API Gateway
Stars: ✭ 27 (+28.57%)
Mutual labels:  apigateway
koa-shopify-auth
DEPRECATED Middleware to authenticate a Koa application with Shopify
Stars: ✭ 82 (+290.48%)
Mutual labels:  koa
e5-api-renew-scf
本项目已进入半废弃状态(因为我自己的开发者订阅在2020年12月掉了)所以这里可能只能提供基础技术指导——[腾讯云函数专用]通过重复调用MS Graph API来试图续订Office 365开发者试用
Stars: ✭ 39 (+85.71%)
Mutual labels:  tencent-cloud
pupflare
A webpage proxy that request through Chromium (puppeteer) - can be used to bypass Cloudflare anti bot / anti ddos on any application (like curl)
Stars: ✭ 183 (+771.43%)
Mutual labels:  koa
koa-subdomain
Simple and lightweight Koa middleware to handle multilevel and wildcard subdomains
Stars: ✭ 23 (+9.52%)
Mutual labels:  koa
koa-plus
The Koa framework extended for APIs. Optimized for security, scalability, and productivity.
Stars: ✭ 17 (-19.05%)
Mutual labels:  koa
koa-to-serverless
只需要改一行代码就能够让你的 Koa 框架应用在 Serverless 架构环境上运行
Stars: ✭ 28 (+33.33%)
Mutual labels:  koa
ndaify-web
NDAify helps you keep your trade secrets under wraps 🔒
Stars: ✭ 33 (+57.14%)
Mutual labels:  koa
koa-mongoDB
😊😊Koa and mongoose build services
Stars: ✭ 24 (+14.29%)
Mutual labels:  koa
http-api-aws-fargate-cdk
Build HTTP API Based Services using Amazon API Gateway, AWS PrivateLink, AWS Fargate and AWS CDK
Stars: ✭ 5 (-76.19%)
Mutual labels:  apigateway
koa-react-redux-universal-boilerplate
[Unmaintained] A fullstack Koa + React + Redux Universal Boilerplate to speed up your development process.
Stars: ✭ 22 (+4.76%)
Mutual labels:  koa

Serverless + JavaScript

简介

serverlessplus 是一个简单易用的工具,它可以帮助你将现有的 express / koa / restify 等框架构建的应用借助 API 网关 迁移到 腾讯云无服务云函数(Tencent Cloud Serverless Cloud Function)上。

开始使用

$ npm install serverlessplus

假设有如下 express 应用:

// app.js
'use strict';

const express = require('express');
const app = express();

app.get('/', (request, response) => {
    response.end('hello world');
});

app.litsen(8000);

可以通过如下简单修改,迁移到 serverless 平台上:

// app.js
'use strict';

const express = require('express');
const app = express();

app.get('/', (request, response) => {
    response.end('hello world');
});

// comment out `listen`
// exports your `app`

// app.litsen(8000);
module.exports = app;

将服务到入口文件修改为如下内容:

// index.js
'use strict';

const app = require('./app');
const serverlessplus = require('serverlessplus');

const options = {
    binaryMIMETypes: [
        'image/gif',
        'image/png',
        'image/jpeg',
    ],
    framework: 'express',
};

const proxy = serverlessplus.createProxy(app, options);

exports.main_handler = (event, context) => {
    return proxy.serveRequest(event, context);
}

示例

支持的框架

路线图

  • 更多 Web 框架的支持
  • 对小程序云开发的支持

serverlessplus 处于活跃开发中,API 可能在未来的版本中发生变更,我们十分欢迎来自社区的贡献,你可以通过 pull request 或者 issue 来参与。

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].