You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Are you using **VSCode** and **want to do live reload** but **do not want to install livereload-basic's Node dependencies** or **run it using Docker**?
13
+
> [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) might be the tool for you. Check it out from from the Visual Studio Marketplace.
14
+
11
15
### Content
12
16
13
17
-[Dependencies](#dependencies)
@@ -56,15 +60,18 @@ These steps use **Node** and **Yarn** to run the development app.
56
60
1. Run the localhost static website development environment.<br>
57
61
`yarn dev`
58
62
59
-
2. Edit the existing static files from the **./public** directory and wait for live reload. Your updates will reflect on the web browser.
63
+
2. Launch the local development website at:<br>
64
+
`http://localhost:3000`
65
+
66
+
3. Edit the existing static files from the **./public** directory and wait for live reload. Your updates will reflect on the web browser.
60
67
61
-
3. To include new static website files on live reload:
68
+
4. To include new static website files on live reload:
62
69
- Create new static (.html, .js, .css) files inside the **./public** directory.
63
70
- Refresh the web browser.
64
71
- Restart the web server if updates don't show after a while.<br>
65
72
`yarn dev`
66
73
67
-
4. Run the production static website (does not use live reload).<br>
74
+
5. Run the production static website (does not use live reload).<br>
68
75
`yarn start`
69
76
70
77
## Available Scripts
@@ -90,9 +97,9 @@ This project deploys the latest **development** Docker image to Docker Hub on th
> Replace `-p 3000:3000` with other port bindings as needed._
126
+
> 💡**TIP:**<br>
127
+
> _To use other port bindings aside from the default `3000`:_
128
+
> 1. Add a `PORT` environment variable eg., `-e PORT=3003`
129
+
> 2. Replace `-p 3000:3000` with the `PORT` environment variable.
121
130
122
131
- Using Docker compose (2nd option):<br>
123
132
- `docker compose -f docker-compose.dev.yml up`
124
-
- > **INFO:** Uncomment the following lines in the `docker-compose.dev.yml` file when working in a Windows host.
133
+
- > **INFO:** Uncomment the following lines in the `docker-compose.dev.yml` file when working in a **Windows host**.
134
+
```yml
135
+
environment:
136
+
# Enable USE_POLLING if working in Windows WSL2 to enable live reload
137
+
- USE_POLLING=true
125
138
```
126
-
# Enable USE_POLLING if working in Windows WSL2 to enable live reload
127
-
environment:
128
-
- USE_POLLING=true
139
+
- > **INFO:** Enable using **other ports** - uncomment the following lines in the `docker-compose.dev.yml` and expose the new port under the `"ports"` section.
140
+
```yml
141
+
ports:
142
+
- "3002:3002"
143
+
environment:
144
+
# Use other ports aside from the 3000 default
145
+
# Ensure to map and expose this port under the "ports" section eg., -"3002:3002"
146
+
- PORT=3002
129
147
```
130
148
3. Refer to the [Usage](#usage) section steps **# 2 - # 4** for local development.
131
149
@@ -154,7 +172,7 @@ The **development** Docker image contains Node runtime, Gulp, Browser-Sync and Y
154
172
155
173
### Production Image
156
174
157
-
The **production** Docker image contains the static website running in an nginx container for minimal production website build. Build it with:
175
+
The **production** Docker image contains the static website running in an Nginx container for minimal production website build. Build it with:
0 commit comments