Skip to content

Commit f3df4ca

Browse files
authored
[Performane] : Fix slow loading of Music Blocks on all the browsers (#4331)
* chore: format index.html * perf: add header links in optimized order * perf: fix large-layout-shift and render-blocking issues * chore: re-format the index.html file * fix: fix the alignment of the video * feat: use http-server instead of SimpleHTTPServer for Keep-Alive functionality * perf: add gzip and brotli for text compression * perf: add express server for efficient loading * perf: reduce lcp time * fix: fix show the loading text * chore: update package-lock.json
1 parent a386190 commit f3df4ca

File tree

5 files changed

+4380
-5086
lines changed

5 files changed

+4380
-5086
lines changed

README.md

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -96,47 +96,18 @@ CLI_), on your local machine.
9696
2. In a terminal, `cd` to the directory where you downloaded/cloned
9797
Music Blocks, using `cd path/to/musicblocks/`.
9898

99-
3. If you do not have [_Python_](https://www.python.org) installed,
100-
you'll need to install it. You can test for Python in a terminal
101-
using `python`. Type `exit()` to exit Python. (Note that on some older
102-
Linux systems, the `python3` command is not bound to python. You may
103-
need to perform a `sudo apt install python-is-python3` on Debian-like
104-
distros, or equivalent on others.)
105-
106-
4. After cloning the musicblocks repository, you can choose one of two methods to start a local server: using Python or using npm
107-
108-
**Using Python**
109-
110-
for _Linux_ and _macOS_:
111-
112-
```bash
113-
python -c "import os, sys; os.system('python -m SimpleHTTPServer 3000 --bind 127.0.0.1') if sys.version_info.major==2 else os.system('python -m http.server 3000 --bind 127.0.0.1')"
114-
```
115-
116-
for _Windows_:
99+
3. After you are in `path/to/musicblocks/` directory, install the dependencies using the following command
117100

118101
```bash
119-
python -c "import os, sys; os.system('python -m SimpleHTTPServer 3000') if sys.version_info.major==2 else os.system('python -m http.server 3000 --bind 127.0.0.1')"
102+
npm install
120103
```
121104

122-
123-
**Using npm**
124-
125-
for _Linux_ and _macOS_:
105+
4. After cloning the musicblocks repository, you can start a local server using npm
126106

127107
```bash
128-
npm run serve
108+
npm run dev
129109
```
130110

131-
for _Windows_:
132-
133-
```bash
134-
npm run winserve
135-
```
136-
137-
**NOTE:** _Make sure you can run either `python` or `py` from your
138-
terminal, to launch the Python prompt._
139-
140111
6. You should see a message `Serving HTTP on 127.0.0.1 port 3000
141112
(http://127.0.0.1:3000/) ...` since the HTTP Server is set to start
142113
listening on port 3000.

0 commit comments

Comments
 (0)