Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arnauorriols/deno-next-start
https://github.com/arnauorriols/deno-next-start
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/arnauorriols/deno-next-start
- Owner: arnauorriols
- Created: 2024-10-18T10:02:27.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T13:28:34.000Z (2 months ago)
- Last Synced: 2024-10-25T00:44:49.661Z (2 months ago)
- Language: TypeScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Use `next start` in Deno Deploy
This package enables the use of `next start` in Deno Deploy, by replicating the
command as a param-less entrypoint configurable via env variables.# Usage
Set `jsr:@deno/nextjs-start` as the entrypoint of your Next.js app.
When linking your Git repository in the Dash frontend, Deno Deploy will
automatically discover that the project uses Next.js and will set the Github
Action automatially using this entrypoint.If you prefer deploying via CLI, following the next steps:
1. Build your app
```bash
deno run build
```2. Deploy
```bash
deployctl deploy --include=.next --include=public jsr:@deno/nextjs-start
```Make sure to use the `--include=.next --include=public` option, particularly if
your project configuration is in commonjs and the config file has the `.js`
extension (ie `next.config.js`).## Next.js version
By default, this adapter uses Next.js v14. If you project depends on Next.js
v15, use `jsr:@deno/nextjs-start/v15` as the entrypoint.# Configuration
The following envs are available for configuration:
- `DENO_NEXT_START_KEEP_ALIVE_TIMEOUT`: Specify the maximum amount of
milliseconds to wait before closing inactive connections.
- `DENO_NEXT_START_DIRECTORY`: Specify the directory where the production build
should be located. Defaults to `.next`.