-
Notifications
You must be signed in to change notification settings - Fork 514
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
docs(render_com): update instructions #2536
Draft
MickL
wants to merge
4
commits into
nitrojs:main
Choose a base branch
from
MickL:patch-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,33 +6,19 @@ | |
|
||
:read-more{title="render.com" to="https://render.com"} | ||
|
||
## Set up application | ||
## Set up application (Runtime: Node) | ||
|
||
1. [Create a new Web Service](https://dashboard.render.com/select-repo?type=web) and select the repository that contains your code. | ||
2. Ensure the 'Node' environment is selected. | ||
3. Update the start command to `node .output/server/index.mjs` | ||
4. Click 'Advanced' and add an environment variable with `NITRO_PRESET` set to `render_com`. You may also need to add a `NODE_VERSION` environment variable set to `18` for the build to succeed ([docs](https://render.com/docs/node-version)). | ||
3. Update the build command to `npm install; npm run build` (you may replace `npm` with your package manager of choice, e.g. `yarn` or `bun`) | ||
MickL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
4. Update the start command to `node .output/server/index.mjs` | ||
5. Click 'Create Web Service'. | ||
|
||
## Infrastructure as Code (IaC) | ||
## Set up application (Runtime: Bun) | ||
|
||
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 | ||
|
||
```yaml | ||
services: | ||
- type: web | ||
name: <PROJECTNAME> | ||
env: node | ||
branch: main | ||
startCommand: node .output/server/index.mjs | ||
buildCommand: npx nypm install && npm run build | ||
envVars: | ||
- key: NITRO_PRESET | ||
value: render_com | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would keep this as alternative to web UI setup wizard. |
||
|
||
1. [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! | ||
1. [Create a new Web Service](https://dashboard.render.com/select-repo?type=web) and select the repository that contains your code. | ||
2. Ensure the 'Node' environment is selected. | ||
3. Update the build command to `bun install; bun run build` | ||
MickL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
4. Update the start command to `bun run .output/server/index.mjs` | ||
5. Click 'Advanced' and add an environment variable with `NITRO_PRESET` set to `bun`. | ||
6. Click 'Create Web Service'. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are reasons we have explicit preset please keep it.