Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md with Genezio Cloud #681

Open
wants to merge 3 commits into
base: mainline
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Starting a new software project? Check out Code Genie - a <a href="https://codeg
</a>
</p>

Run REST APIs and other web applications using your existing [Node.js](https://nodejs.org/) application framework (Express, Koa, Hapi, Sails, etc.), on top of [AWS Lambda](https://aws.amazon.com/lambda/) and [Amazon API Gateway](https://aws.amazon.com/api-gateway/) or [Azure Function](https://docs.microsoft.com/en-us/azure/azure-functions/).
Run REST APIs and other web applications using your existing [Node.js](https://nodejs.org/) application framework (Express, Koa, Hapi, Sails, etc.), on top of [AWS Lambda](https://aws.amazon.com/lambda/), [Amazon API Gateway](https://aws.amazon.com/api-gateway/), [Azure Function](https://docs.microsoft.com/en-us/azure/azure-functions/) or [Genezio Cloud](https://genezio.com/)

```bash
npm install @codegenie/serverless-express
Expand Down Expand Up @@ -101,6 +101,40 @@ function handler (event, context) {
exports.handler = handler
```

## Genezio
Genezio is a serverless cloud compatible with Lambda functions but faster and cheaper.

### Minimal handler app

The only AWS Lambda-compatible code you need to write is a simple handler like the one below. You can write all other code as you would normally do.

```js
// index.mjs
import express from 'express';
import serverlessExpress from '@codegenie/serverless-express';

const app = express();

app.get('/', (req, res) => {
res.send('Hello World from Express serverless!xx');
});

// You don't need to listen to the port when using serverless functions in production
if (process.env.NODE_ENV === 'dev') {
app.listen(8080, () => {
console.log(
'Server is running on port 8080. Check the app on http://localhost:8080'
);
});
}

export const handler = serverlessExpress({ app });
```

Try out a ready-to-use demo:

[![Deploy to Genezio](https://raw.githubusercontent.com/Genez-io/graphics/main/svg/deploy-button.svg)](https://app.genez.io/start/deploy?repository=https://github.com/Genez-io/codegenie-serverless-express)

## Azure

### Async Azure Function v3/v4 handler wrapper
Expand Down