Skip to content

Commit af1263b

Browse files
committed
Merge branch 'liamnorm/main' into main
2 parents 5902b0f + a43b584 commit af1263b

File tree

2 files changed

+54
-44
lines changed

2 files changed

+54
-44
lines changed

.markdownlint.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
// MD007/ul-indent - Unordered list indentation
3838
"MD007": {
3939
// Spaces for indent
40-
"indent": 2,
40+
"indent": 4,
4141
// Whether to indent the first level of the list
4242
"start_indented": false
4343
},

README.md

Lines changed: 53 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ _This project is containerized using [**docker**](https://www.docker.com/). Ther
3535
- For _Windows_ or _Mac_ (_x86_64 / amd64_),
3636
[install _Docker Desktop_](https://www.docker.com/products/docker-desktop).
3737

38-
2. Open a teminal and navigate to working directory (where the source code will reside).
38+
2. Open a terminal and navigate to working directory (where the source code will reside).
3939

4040
3. _Git Clone_ (additional [installation](https://git-scm.com/downloads) of _Git_ required on
4141
Windows) this repository using
@@ -73,24 +73,24 @@ Windows) this repository using
7373
locally, it'll not be rebuilt. To force a rebuild from the `Dockerfile` before launching the
7474
_docker network_, add the `--build` flag.
7575
76-
5. In another terminal, run
76+
5. In a second terminal, run
7777
7878
```bash
7979
docker attach musicblocks
8080
```
8181
82-
6. The _Linux Debian 10.7_ (_buster_) _shell_ in the _docker container_ named _musicblocks_ is
83-
spawned and standard input/output is connected to the terminal.
82+
The _Linux Debian 10.7_ (_buster_) _shell_ in the _docker container_ named _musicblocks_ is
83+
spawned and standard input/output is connected to the terminal.
8484
85-
_**Node**_ (_Node.js Runtime_), _**npm**_ (_Node Package Manager_), _**tsc**_ (_TypeScript
85+
6. _**Node**_ (_Node.js Runtime_), _**npm**_ (_Node Package Manager_), _**tsc**_ (_TypeScript
8686
Compiler_), and _**ts-node**_ (_Node executable for TypeScript_) should be installed. Check
8787
using
8888
8989
```bash
9090
node --version && npm --version && tsc --version && ts-node --version
9191
```
9292
93-
Output should look like
93+
in the second terminal. Output should look like
9494
9595
```bash
9696
v14.16.1
@@ -99,26 +99,48 @@ spawned and standard input/output is connected to the terminal.
9999
v9.1.1
100100
```
101101
102-
7. To shut down the _docker network_, run (in the terminal where you ran `docker-compose up -d` or
103-
`docker compose up -d`)
102+
The steps you take from here depend on what you want to do:
104103
105-
```bash
106-
docker-compose down
107-
```
104+
- **Run test suites and run a development server**
108105
109-
or (for _Docker v1.28_ and above)
106+
1. To install all the dependencies (in `package.json`), run
110107
111-
```bash
112-
docker compose down
113-
```
108+
```bash
109+
npm ci
110+
```
114111
115-
8. To install all the dependencies (in `package.json`), run
112+
2. Run _React scripts_.
116113
117-
```bash
118-
npm ci
119-
```
114+
- For unoptimized development serving, run
115+
116+
```bash
117+
npm start
118+
```
119+
120+
This is spawned on `127.0.0.1:3000` inside the container, but mapped to `localhost:5000`
121+
on host. Visit `localhost:5000` in a browser to view the webpage served.
122+
123+
Currently this will open a page with a "Hello world!" message.
124+
125+
- For testing, run
126+
127+
```bash
128+
npm run test
129+
```
130+
131+
- For generating a production build, run
132+
133+
```bash
134+
npm run build
135+
```
136+
137+
_**Note:**_ If you're running using _Docker Desktop_ on _Windows_ or _Mac_, you might experience
138+
longer execution times for these scripts. This happens due to cross-file-system communication.
139+
Duration varies across machines; duration primarily depends on hard drive read/write speed.
120140

121-
9. To spawn a _HTTP Server_ (uses _Python 3_'s `http.server`), run
141+
- **HTTP server**
142+
143+
To spawn an _HTTP Server_ (uses _Python 3_'s `http.server`), run
122144
123145
```bash
124146
npm run serve
@@ -127,34 +149,22 @@ spawned and standard input/output is connected to the terminal.
127149
This is spawned on `0.0.0.0:80` inside the container, but mapped to `localhost:5001` on host.
128150
Visit `localhost:5001` in a browser to view the webpage served.
129151
130-
10. Run _React scripts_.
131-
132-
- For unoptimized development serving, run
133-
134-
```bash
135-
npm start
136-
```
152+
- **Shut down docker network**
137153
138-
This is spawned on `127.0.0.1:3000` inside the container, but mapped to `localhost:5000` on
139-
host. Visit `localhost:5000` in a browser to view the webpage served.
140-
141-
- For testing, run
142-
143-
```bash
144-
npm run test
145-
```
154+
To shut down the _docker network_, run (in the terminal where you ran `docker-compose up -d` or
155+
`docker compose up -d`)
146156
147-
- For generating a production build, run
157+
```bash
158+
docker-compose down
159+
```
148160
149-
```bash
150-
npm run build
151-
```
161+
or (for _Docker v1.28_ and above)
152162
153-
_**Note:**_ If you're running using _Docker Desktop_ on _Windows_ or _Mac_, you might experience
154-
longer execution times for these scripts. This happens due to cross-file-system communication.
155-
Duration varies across machines; duration primarily depends on hard drive read/write speed.
163+
```bash
164+
docker compose down
165+
```
156166
157-
11. Miscellaneous commands.
167+
- **Miscellaneous commands**
158168
159169
- To launch the _Node runtime_, run
160170

0 commit comments

Comments
 (0)