Skip to content

Commit

Permalink
docs: rename to code genie projec
Browse files Browse the repository at this point in the history
  • Loading branch information
brettstack committed Dec 14, 2023
1 parent ebd42d4 commit 99a2b22
Show file tree
Hide file tree
Showing 82 changed files with 956 additions and 718 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ npm-debug.log
.env
coverage
sam-template.packaged.yaml
vendia-serverless-express-*.tgz
codegenie-serverless-express-*.tgz
dist/
examples/nextjs
typescript-out
Expand Down
236 changes: 118 additions & 118 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Please read through this document before submitting any issues or pull requests

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check [existing open](https://github.com/vendia/serverless-express/issues), or [recently closed](https://github.com/vendia/serverless-express/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
When filing an issue, please check [existing open](https://github.com/CodeGenieApp/serverless-express/issues), or [recently closed](https://github.com/CodeGenieApp/serverless-express/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

* A reproducible test case or series of steps
* The version of our code being used
Expand Down Expand Up @@ -44,7 +44,7 @@ Please refer to our [Code of Conduct](CODE_OF_CONDUCT.md)

## Security issue notifications

If you discover a potential security issue in this project we ask that you notify us directly - brett@vendia.net. Please do **not** create a public github issue.
If you discover a potential security issue in this project we ask that you notify us directly - brett@codegenie.codes. Please do **not** create a public github issue.

## Licensing

Expand Down
47 changes: 28 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@

<h2 align="center">Serverless Express by</h1>
<p align="center">
<a href="https://vendia.com">
<img src="https://raw.githubusercontent.com/vendia/serverless-express/mainline/vendia-logo.png" alt="Vendia Logo">
<a href="https://codegenie.codes">
<img src="https://raw.githubusercontent.com/CodeGenieApp/serverless-express/mainline/code-genie-logo.png" alt="Code Genie Logo">
</a>
</p>
<p width=200>
Data sharing is hard. Data sharing between partners is even harder. That’s why we built Vendia Share. Bring trust and a single source of truth to partner data sharing and secure, compliant, real-time collaboration — no matter your partners’ geographies, stack of systems, data architecture, or clouds.

Starting a new software project? Check out Code Genie - a <a href="https://codegenie.codes">Full Stack App Generator</a> that generates source code based on your project's data model. Including:

1. A React Next.js Web App hosted on Amplify Hosting
1. Serverless Express REST API running on API Gateway and Lambda
1. Cognito User Pools for Identity/Authentication
1. DynamoDB Database
1. Cloud Development Kit (CDK) for Infrastructure as Code (IAC)
1. Continuous Integration/Delivery (CI/CD) with GitHub Actions
1. And more!
</p>

# Serverless Express

<p align="center">
<a aria-label="Made by Vendia" href="https://vendia.com">
<img src="https://img.shields.io/badge/MADE%20BY%20Vendia-000000.svg?style=for-the-badge&logo=Vendia&labelColor=000">
<a aria-label="Made by Code Genie" href="https://codegenie.codes">
<img src="https://img.shields.io/badge/MADE%20BY%20Code%20Genie-000000.svg?style=for-the-badge&logo=Code%20Genie&labelColor=000">
</a>
<a aria-label="NPM version" href="https://www.npmjs.com/package/@vendia/serverless-express">
<img alt="" src="https://img.shields.io/npm/v/@vendia/serverless-express.svg?style=for-the-badge&labelColor=000000">
<a aria-label="NPM version" href="https://www.npmjs.com/package/@codegenie/serverless-express">
<img alt="" src="https://img.shields.io/npm/v/@codegenie/serverless-express.svg?style=for-the-badge&labelColor=000000">
</a>
<a aria-label="License" href="https://github.com/vendia/serverless-express/blob/canary/license.md">
<img alt="" src="https://img.shields.io/npm/l/@vendia/serverless-express.svg?style=for-the-badge&labelColor=000000">
<a aria-label="License" href="https://github.com/CodeGenieApp/serverless-express/blob/canary/license.md">
<img alt="" src="https://img.shields.io/npm/l/@codegenie/serverless-express.svg?style=for-the-badge&labelColor=000000">
</a>
<a aria-label="Number of Downloads" href="https://www.npmjs.com/package/@vendia/serverless-express">
<img alt="" src="https://img.shields.io/npm/dm/@vendia/serverless-express.svg?style=for-the-badge&labelColor=000000">
<a aria-label="Number of Downloads" href="https://www.npmjs.com/package/@codegenie/serverless-express">
<img alt="" src="https://img.shields.io/npm/dm/@codegenie/serverless-express.svg?style=for-the-badge&labelColor=000000">
</a><!--
<a aria-label="Contributor Covenant" href="CODE_OF_CONDUCT.md">
<img alt="" src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?style=for-the-badge&labelColor=000000">
Expand All @@ -32,7 +41,7 @@ Data sharing is hard. Data sharing between partners is even harder. That’s why
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/).

```bash
npm install @vendia/serverless-express
npm install @codegenie/serverless-express
```

## Quick Start/Example
Expand All @@ -54,19 +63,19 @@ The only AWS Lambda specific code you need to write is a simple handler like bel

```js
// lambda.js
const serverlessExpress = require('@vendia/serverless-express')
const serverlessExpress = require('@codegenie/serverless-express')
const app = require('./app')
exports.handler = serverlessExpress({ app })
```

### Async setup Lambda handler

If your application needs to perform some common bootstrap tasks such as connecting to a database before the request is forward to the API, you can use the following pattern (also available in [this example](https://github.com/vendia/serverless-express/blob/mainline/examples/basic-starter-api-gateway-v2/src/lambda-async-setup.js)):
If your application needs to perform some common bootstrap tasks such as connecting to a database before the request is forward to the API, you can use the following pattern (also available in [this example](https://github.com/CodeGenieApp/serverless-express/blob/mainline/examples/basic-starter-api-gateway-v2/src/lambda-async-setup.js)):

```js
// lambda.js
require('source-map-support/register')
const serverlessExpress = require('@vendia/serverless-express')
const serverlessExpress = require('@codegenie/serverless-express')
const app = require('./app')

let serverlessExpressInstance
Expand Down Expand Up @@ -101,7 +110,7 @@ The only Azure Function specific code you need to write is a simple `index.js` a

```js
// index.js
const serverlessExpress = require('@vendia/serverless-express')
const serverlessExpress = require('@codegenie/serverless-express')
const app = require('./app')
const cachedServerlessExpress = serverlessExpress({ app })

Expand Down Expand Up @@ -144,7 +153,7 @@ The _out-binding_ parameter `"name": "$return"` is important for Serverless Expr
1. Node.js 12+
1. Improved support for custom domain names

See [UPGRADE.md](UPGRADE.md) to upgrade from aws-serverless-express and @vendia/serverless-express 3.x
See [UPGRADE.md](UPGRADE.md) to upgrade from aws-serverless-express and @codegenie/serverless-express 3.x

## API

Expand Down Expand Up @@ -337,7 +346,7 @@ Provide a custom `log` object with `info`, `debug` and `error` methods. For exam
This package exposes a function to easily get the `event` and `context` objects Lambda receives from the event source.

```js
const { getCurrentInvoke } = require('@vendia/serverless-express')
const { getCurrentInvoke } = require('@codegenie/serverless-express')
app.get('/', (req, res) => {
const { event, context } = getCurrentInvoke()
Expand Down Expand Up @@ -365,7 +374,7 @@ app.get('/', (req, res) => {

# AWS Serverless Express is now under the stewardship of Vendia

On 11/30, the AWS Serverless Express library moved from AWS to [Vendia](https://github.com/vendia/serverless-express) and will be rebranded to `@vendia/serverless-express`. Similarly, the [`aws-serverless-express` NPM package](https://www.npmjs.com/package/aws-serverless-express) will be deprecated in favor of [@vendia/serverless-express](https://www.npmjs.com/package/@vendia/serverless-express).
On 11/30, the AWS Serverless Express library moved from AWS to [Vendia](https://github.com/CodeGenieApp/serverless-express) and will be rebranded to `@codegenie/serverless-express`. Similarly, the [`aws-serverless-express` NPM package](https://www.npmjs.com/package/aws-serverless-express) will be deprecated in favor of [@codegenie/serverless-express](https://www.npmjs.com/package/@codegenie/serverless-express).

[Brett Andrews](https://github.com/brettstack), the original creator of the Serverless Express library, will continue maintaining the repository and give it the attention and care it deserves. At the same time, we will be looking for additional contributors to participate in the development and stewardship of the Serverless Express library. AWS and the [SAM team](https://github.com/aws/aws-sam-cli) will remain involved in an administrative role alongside Vendia, Brett, and the new maintainers that will join the project.

Expand Down
6 changes: 3 additions & 3 deletions SCOPE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ directory which allows developers to quickly deploy a running application using

This repository should contain:

- The @vendia/serverless-express library.
- Documentation on using @vendia/serverless-express
- Examples of using the @vendia/serverless-express library.
- The @codegenie/serverless-express library.
- Documentation on using @codegenie/serverless-express
- Examples of using the @codegenie/serverless-express library.

This repository does not contain:

Expand Down
4 changes: 2 additions & 2 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports.handler = (event, context) => { awsServerlessExpress.proxy(server, event

```javascript
// 4.x
const serverlessExpress = require('@vendia/serverless-express')
const serverlessExpress = require('@codegenie/serverless-express')
const app = require('./app')

exports.handler = serverlessExpress({ app })
Expand Down Expand Up @@ -51,7 +51,7 @@ router.get('/', (req, res) => {

```javascript
// 4.x
const { getCurrentInvoke } = require('@vendia/serverless-express')
const { getCurrentInvoke } = require('@codegenie/serverless-express')
router.get('/', (req, res) => {
const currentInvoke = getCurrentInvoke()
res.json({
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit.api-gateway-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const apiGatewayEventSource = eventSources.getEventSource({

test('request has correct headers', () => {
const req = getReq()
// see https://github.com/vendia/serverless-express/issues/387
// see https://github.com/CodeGenieApp/serverless-express/issues/387
expect(typeof req).toEqual('object')
expect(JSON.stringify(req.headers)).toEqual(
'{"cookie":"","host":"localhost:9000","user-agent":"curl/7.64.1","accept":"*/*","x-forwarded-proto":"http","x-forwarded-port":"9000"}'
Expand Down
Binary file added code-genie-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/alb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```bash
npm pack ../..
npm install ./vendia-serverless-express-4.0.0-rc.3.tgz
npm install ./codegenie-serverless-express-4.0.0-rc.3.tgz
npm install --prefix ./src ./
node local.js
```
6 changes: 3 additions & 3 deletions examples/alb/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@vendia/serverless-express-alb-example",
"name": "@codegenie/serverless-express-alb-example",
"version": "1.0.0",
"description": "Example application for running Express on AWS Lambda backed by ALB",
"main": "src/index.js",
Expand All @@ -13,7 +13,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@vendia/serverless-express": "^4.3.0",
"@codegenie/serverless-express": "^4.3.0",
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"express": "^4.17.1",
Expand All @@ -22,4 +22,4 @@
"devDependencies": {
"lodash": "^4.17.21"
}
}
}
6 changes: 3 additions & 3 deletions examples/alb/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path')
const express = require('express')
const bodyParser = require('body-parser')
const cors = require('cors')
const { getCurrentInvoke } = require('@vendia/serverless-express')
const { getCurrentInvoke } = require('@codegenie/serverless-express')
const app = express()
const router = express.Router()

Expand All @@ -22,8 +22,8 @@ router.get('/', (req, res) => {
})
})

router.get('/vendia', (req, res) => {
res.sendFile(path.join(__dirname, 'vendia-logo.png'))
router.get('/code-genie-logo', (req, res) => {
res.sendFile(path.join(__dirname, 'code-genie-logo.png'))
})

router.get('/users', (req, res) => {
Expand Down
Binary file added examples/alb/src/code-genie-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/alb/src/lambda.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const serverlessExpress = require('@vendia/serverless-express')
const serverlessExpress = require('@codegenie/serverless-express')
const app = require('./app')

exports.handler = serverlessExpress({ app })
Binary file removed examples/alb/src/vendia-logo.png
Binary file not shown.
4 changes: 2 additions & 2 deletions examples/alb/src/views/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ html
white-space: nowrap;
overflow-x: auto;
}
.vendia-logo {
.code-genie-logo {
display: block;
width: 10rem;
margin: auto;
Expand All @@ -42,7 +42,7 @@ html
}
body
h1 My Serverless Application
img.vendia-logo(src='vendia')
img.code-genie-logo(src='code-genie-logo')
p
| Welcome to your AWS serverless application. This example application has several resources configured for you to explore. State is stored in memory in a given container, and is therefore ephemeral - see
a(href='https://aws.amazon.com/blogs/compute/container-reuse-in-lambda/', target='_blank') Understanding Container Reuse in AWS Lambda
Expand Down
6 changes: 3 additions & 3 deletions examples/azure-http-function-v3/HttpExample/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const express = require('express')
const bodyParser = require('body-parser')
const cors = require('cors')
const compression = require('compression')
const { getCurrentInvoke } = require('../../../src/index') // require('@vendia/serverless-express')
const { getCurrentInvoke } = require('../../../src/index') // require('@codegenie/serverless-express')
const ejs = require('ejs').__express
const app = express()
const router = express.Router()
Expand All @@ -28,8 +28,8 @@ router.get('/api', (req, res) => {
res.render('index', { apiUrl })
})

router.get('/api/vendia', (req, res) => {
res.sendFile(path.join(__dirname, 'vendia-logo.png'))
router.get('/api/code-genie-logo', (req, res) => {
res.sendFile(path.join(__dirname, 'code-genie-logo.png'))
})

router.get('/api/users', (req, res) => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/azure-http-function-v3/HttpExample/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const serverlessExpress = require('../../../src/index') // require('@vendia/serverless-express')
const serverlessExpress = require('../../../src/index') // require('@codegenie/serverless-express')
const app = require('./app')
const cachedServerlessExpress = serverlessExpress({ app })

Expand Down
Binary file not shown.
Loading

0 comments on commit 99a2b22

Please sign in to comment.