Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicholasgriffintn/next-repo-template
Created with StackBlitz ⚡️
https://github.com/nicholasgriffintn/next-repo-template
Last synced: about 1 month ago
JSON representation
Created with StackBlitz ⚡️
- Host: GitHub
- URL: https://github.com/nicholasgriffintn/next-repo-template
- Owner: nicholasgriffintn
- Created: 2023-09-11T21:41:42.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-12T01:11:26.000Z (about 1 year ago)
- Last Synced: 2024-04-22T05:10:37.295Z (7 months ago)
- Language: TypeScript
- Homepage: https://stackblitz.com/edit/github-uscunc
- Size: 64.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Custom server with TypeScript + Nodemon example
The example shows how you can use [TypeScript](https://typescriptlang.com) on both the server and the client while using [Nodemon](https://nodemon.io/) to live reload the server code without affecting the Next.js universal code.
Server entry point is `server.ts` in development and `dist/server.js` in production.
The `dist` directory should be added to `.gitignore`.## Deploy your own
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/custom-server)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/custom-server)
## How to use
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:
```bash
npx create-next-app --example custom-server custom-server-app
# or
yarn create next-app --example custom-server custom-server-app
# or
pnpm create next-app --example custom-server custom-server-app
```