Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Performane] : Fix slow loading of Music Blocks on all the browsers #4331

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
37 changes: 4 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,47 +96,18 @@ CLI_), on your local machine.
2. In a terminal, `cd` to the directory where you downloaded/cloned
Music Blocks, using `cd path/to/musicblocks/`.

3. If you do not have [_Python_](https://www.python.org) installed,
you'll need to install it. You can test for Python in a terminal
using `python`. Type `exit()` to exit Python. (Note that on some older
Linux systems, the `python3` command is not bound to python. You may
need to perform a `sudo apt install python-is-python3` on Debian-like
distros, or equivalent on others.)

4. After cloning the musicblocks repository, you can choose one of two methods to start a local server: using Python or using npm

**Using Python**

for _Linux_ and _macOS_:

```bash
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')"
```

for _Windows_:
3. After you are in `path/to/musicblocks/` directory, install the dependencies using the following command

```bash
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')"
npm install
```


**Using npm**

for _Linux_ and _macOS_:
4. After cloning the musicblocks repository, you can start a local server using npm

```bash
npm run serve
npm run dev
```

for _Windows_:

```bash
npm run winserve
```

**NOTE:** _Make sure you can run either `python` or `py` from your
terminal, to launch the Python prompt._

6. You should see a message `Serving HTTP on 127.0.0.1 port 3000
(http://127.0.0.1:3000/) ...` since the HTTP Server is set to start
listening on port 3000.
Expand Down
Loading
Loading