Skip to content

Commit

Permalink
Merge branch 'main' into fix/improve-vfs
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jan 9, 2023
2 parents af2dc4a + 45b3abd commit 1f76f30
Show file tree
Hide file tree
Showing 8 changed files with 218 additions and 159 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"quotes": 0,
"keyword-spacing": 0,
"no-undef": 0,
"indent": 0,
"unicorn/catch-error-name": 0,
"unicorn/no-null": 0,
"unicorn/no-useless-undefined": 0,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<h1 align="center">⚗️ Nitro</h1>
<p align="center">Build and Deploy Universal JavaScript Servers</p>

## Why using Nitro?
## Why use Nitro?

Nitro provides a powerful toolchain and a runtime framework from the [UnJS](https://github.com/unjs) ecosystem to build and deploy **any JavaScript server, anywhere!**

Expand Down
2 changes: 1 addition & 1 deletion docs/content/1.guide/1.introduction/3.routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default eventHandler(async event => {
```js
// routes/user.post.ts
export default eventHandler(async event => {
const body = await useBody(event)
const body = await readyBody(event)
// TODO: Handle body and update user
return `User updated!`
})
Expand Down
20 changes: 20 additions & 0 deletions docs/content/2.deploy/providers/render.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,24 @@ Nitro supports deploying on [Render](https://render.com/) with minimal configura

1. Click 'Create Web Service'.

## Infrastructure as Code (IaC)

1. Create a file called `render.yaml` with following content at the root of your repository.
> This file followed by [Infrastructure as Code](https://render.com/docs/infrastructure-as-code) on Render
```
services:
- type: web
name: <PROJECTNAME>
env: node
branch: main
startCommand: node .output/server/index.mjs
buildCommand: npm install && npm run build
envVars:
- key: NITRO_PRESET
value: render-com
```
2. [Create a new Blueprint Instance](https://dashboard.render.com/select-repo?type=blueprint) and select the repository containing your `render.yaml` file.


You should be good to go!
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
},
"dependencies": {
"@cloudflare/kv-asset-handler": "^0.3.0",
"@netlify/functions": "^1.3.0",
"@netlify/functions": "^1.4.0",
"@rollup/plugin-alias": "^4.0.2",
"@rollup/plugin-commonjs": "^24.0.0",
"@rollup/plugin-inject": "^5.0.3",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-terser": "^0.2.1",
"@rollup/plugin-terser": "^0.3.0",
"@rollup/plugin-wasm": "^6.1.1",
"@rollup/pluginutils": "^5.0.2",
"@vercel/nft": "^0.22.6",
Expand All @@ -63,7 +63,7 @@
"defu": "^6.1.1",
"destr": "^1.2.2",
"dot-prop": "^7.2.0",
"esbuild": "^0.16.13",
"esbuild": "^0.16.16",
"escape-string-regexp": "^5.0.0",
"etag": "^1.8.1",
"fs-extra": "^11.1.0",
Expand All @@ -73,7 +73,7 @@
"hookable": "^5.4.2",
"http-proxy": "^1.18.1",
"is-primitive": "^3.0.1",
"jiti": "^1.16.0",
"jiti": "^1.16.1",
"klona": "^2.0.5",
"knitwork": "^1.0.0",
"listhen": "^1.0.1",
Expand All @@ -97,19 +97,19 @@
"source-map-support": "^0.5.21",
"std-env": "^3.3.1",
"ufo": "^1.0.1",
"unenv": "^1.0.0",
"unimport": "^1.1.0",
"unenv": "^1.0.1",
"unimport": "^1.2.0",
"unstorage": "^1.0.1"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.109",
"@types/etag": "^1.8.1",
"@types/fs-extra": "^9.0.13",
"@types/fs-extra": "^11.0.0",
"@types/http-proxy": "^1.17.9",
"@types/node-fetch": "^2.6.2",
"@types/semver": "^7.3.13",
"@types/serve-static": "^1.15.0",
"@vitest/coverage-c8": "^0.26.3",
"@vitest/coverage-c8": "^0.27.0",
"c8": "^7.12.0",
"changelogen": "^0.4.0",
"edge-runtime": "2.0.2",
Expand All @@ -118,12 +118,12 @@
"execa": "^6.1.0",
"expect-type": "^0.15.0",
"miniflare": "^2.11.0",
"prettier": "^2.8.1",
"prettier": "^2.8.2",
"typescript": "^4.9.4",
"unbuild": "^1.0.2",
"vitest": "^0.26.3"
"vitest": "^0.27.0"
},
"packageManager": "pnpm@7.21.0",
"packageManager": "pnpm@7.23.0",
"engines": {
"node": "^14.16.0 || ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
Expand Down
Loading

0 comments on commit 1f76f30

Please sign in to comment.