Skip to content

Commit d8a1e42

Browse files
committed
Improve README with language tags in code sections.
1 parent bac1280 commit d8a1e42

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ It works with MacOS, Linux and Windows, on Chrome and Firefox, and requires you
1616
## Dependencies
1717
nss/certutils are needed for Firefox and Chrome.
1818
#### MacOS
19-
```
19+
```bash
2020
brew install nss
2121
```
2222
#### Linux
23-
```
23+
```bash
2424
sudo apt install libnss3-tools
2525
-or-
2626
sudo yum install nss-tools
@@ -30,10 +30,10 @@ sudo pacman -S nss
3030

3131

3232
## Install and use standalone
33-
```
33+
```bash
3434
npm i -g --only=prod https-localhost
3535
```
36-
```
36+
```bash
3737
serve ~/myproj
3838
```
3939
- `sudo` may be necessary.
@@ -42,7 +42,7 @@ serve ~/myproj
4242

4343
### Binaries
4444
If you don't have Node.js installed just use a packaged version! Download it from the [release page](https://github.com/daquinoaldo/https-localhost/releases).
45-
```
45+
```bash
4646
# Linux
4747
./https-localhost-linux ~/myproj
4848

@@ -58,11 +58,11 @@ If you don't have Node.js installed just use a packaged version! Download it fro
5858

5959
## Use as module
6060
Install as a dependency:
61-
```
61+
```bash
6262
npm i -s https-localhost
6363
```
6464
Then put in your `index.js` file:
65-
```
65+
```javascript
6666
const httpsLocalhost = require("https-localhost")
6767
const app = httpsLocalhost()
6868
// app is an express app, do what you usually do with express
@@ -78,7 +78,7 @@ app.listen(port)
7878

7979
## Production
8080
This tool has a production version that activates **HTTP/2**, **compression** and **minify**.
81-
```
81+
```bash
8282
NODE_ENV=production serve ~/myproj
8383
```
8484
I decide to not activate it by default since it is usually an unwanted behaviour for localhost testing, but sometimes it could be userful, e.g. to test Progressive Web Application or more ingeneral the website performances.

0 commit comments

Comments
 (0)