https://github.com/rishi-raj-jain/layer0-next-i18n-example
https://github.com/rishi-raj-jain/layer0-next-i18n-example
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rishi-raj-jain/layer0-next-i18n-example
- Owner: rishi-raj-jain
- Created: 2022-07-01T14:21:47.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-01T14:41:18.000Z (almost 3 years ago)
- Last Synced: 2024-10-12T13:34:18.296Z (7 months ago)
- Language: JavaScript
- Size: 136 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deploy Next.js i18 example to Layer0
A demo deployment of Next.js i18 app to Layer0.
## Demo
https://rishi-raj-jain-layer0-next-i18n-example-default.layer0-limelight.link/en/isr for the English homepage.
https://rishi-raj-jain-layer0-next-i18n-example-default.layer0-limelight.link/de/isr for the German homepage.## Try It Now
[](https://app.layer0.co/deploy?repo=https://github.com/rishi-raj-jain/layer0-next-i18n-example)
## Getting Started
### Clone This Repo
Use `git clone https://github.com/rishi-raj-jain/layer0-next-i18n-example.git` to get the files within this repository onto your local machine.
### Install dependencies
On the command line, in the project root directory, run the following command:
```bash
npm install
```### Run the Next.js app locally on Layer0
Run the Next.js app with the command:
```bash
npm run layer0:dev
```Load the site: http://127.0.0.1:3000
### Testing production build locally with Layer0
You can do a production build of your app and test it locally using:
```bash
npm run layer0:build && npm run layer0:prod
```Setting --production runs your app exactly as it will be uploaded to the Layer0 cloud using serverless-offline.
## Deploying to Layer0
Deploying requires an account on Layer0. [Sign up here for free](https://app.layer0.co/signup). Once you have an account, you can deploy to Layer0 by running the following in the root folder of your project:
```bash
npm run layer0:deploy
```See [deploying](https://docs.layer0.co/guides/deploying) for more information.