Skip to content

Commit 4355c65

Browse files
committed
Add ngrok specific readme to remix example
1 parent a6e2393 commit 4355c65

File tree

3 files changed

+83
-37
lines changed

3 files changed

+83
-37
lines changed

examples/nextjs/README.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1-
To run:
2-
=======
1+
# To Run
2+
33
`node_modules/.bin/next`
4+
5+
# Explanation
6+
7+
The line `require("./ngrok.config.js");` is added to `next.config.js` which includes the code to setup the ngrok listener on the appropriate port, which defaults to `3000`.
8+
9+
# Example Output
10+
11+
```
12+
> node_modules/.bin/next
13+
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
14+
warn - Detected next.config.js, no exported configuration found. https://nextjs.org/docs/messages/empty-configuration
15+
event - compiled client and server successfully in 210 ms (154 modules)
16+
Forwarding to: localhost:3000 from ingress at: https://04d4d919d236.ngrok.app
17+
```

examples/remix/README.md

+14-35
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
# Welcome to Remix!
2-
3-
- [Remix Docs](https://remix.run/docs)
4-
5-
## Development
1+
# This example wires up Remix development mode
62

73
From your terminal:
84

@@ -12,42 +8,25 @@ npm run dev
128

139
This starts your app in development mode, rebuilding assets on file changes.
1410

15-
## Deployment
11+
# Explanation
1612

17-
First, build your app for production:
13+
The line `require("./ngrok.config.js");` is added to `remix.config.js` which includes the code to setup the ngrok listener on the appropriate port, which defaults to `3000`.
1814

19-
```sh
20-
npm run build
21-
```
22-
23-
Then run the app in production mode:
15+
# Example Output
2416

25-
```sh
26-
npm start
2717
```
18+
> npm run dev
2819
29-
Now you'll need to pick a host to deploy it to.
20+
> dev
21+
> remix dev
3022
31-
### DIY
32-
33-
If you're familiar with deploying node applications, the built-in Remix app server is production-ready.
34-
35-
Make sure to deploy the output of `remix build`
36-
37-
- `build/`
38-
- `public/build/`
23+
Forwarding to: localhost:3000 from ingress at: https://935d84664d13.ngrok.app
24+
Remix App Server started at http://localhost:3000 (http://192.168.2.66:3000)
25+
```
3926

40-
### Using a Template
27+
# Additional information
4128

42-
When you ran `npx create-remix@latest` there were a few choices for hosting. You can run that again to create a new project, then copy over your `app/` folder to the new project that's pre-configured for your target server.
29+
For more information about Remix see:
4330

44-
```sh
45-
cd ..
46-
# create a new project, and pick a pre-configured host
47-
npx create-remix@latest
48-
cd my-new-remix-app
49-
# remove the new project's app (not the old one!)
50-
rm -rf app
51-
# copy your app over
52-
cp -R ../my-old-remix-app/app app
53-
```
31+
- [Remix Docs](https://remix.run/docs)
32+
- [Remix Readme](REMIX-README.md)

examples/remix/REMIX-README.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Welcome to Remix!
2+
3+
- [Remix Docs](https://remix.run/docs)
4+
5+
## Development
6+
7+
From your terminal:
8+
9+
```sh
10+
npm run dev
11+
```
12+
13+
This starts your app in development mode, rebuilding assets on file changes.
14+
15+
## Deployment
16+
17+
First, build your app for production:
18+
19+
```sh
20+
npm run build
21+
```
22+
23+
Then run the app in production mode:
24+
25+
```sh
26+
npm start
27+
```
28+
29+
Now you'll need to pick a host to deploy it to.
30+
31+
### DIY
32+
33+
If you're familiar with deploying node applications, the built-in Remix app server is production-ready.
34+
35+
Make sure to deploy the output of `remix build`
36+
37+
- `build/`
38+
- `public/build/`
39+
40+
### Using a Template
41+
42+
When you ran `npx create-remix@latest` there were a few choices for hosting. You can run that again to create a new project, then copy over your `app/` folder to the new project that's pre-configured for your target server.
43+
44+
```sh
45+
cd ..
46+
# create a new project, and pick a pre-configured host
47+
npx create-remix@latest
48+
cd my-new-remix-app
49+
# remove the new project's app (not the old one!)
50+
rm -rf app
51+
# copy your app over
52+
cp -R ../my-old-remix-app/app app
53+
```

0 commit comments

Comments
 (0)