Skip to content

Commit e765f28

Browse files
madskonradsenmathiasbynens
authored andcommitted
README: improve local setup docs
Closes jsperf#133.
1 parent f9f05fb commit e765f28

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

README.md

+23-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
#### Docker
2121

22+
jsPerf is available at `localhost` and changes to the codebase can be applied by running `docker-compose build web`.
23+
2224
##### One-time Setup
2325

2426
1. Install [Docker Toolbox](https://docs.docker.com/engine/installation/) so you have `docker` and `docker-compose`
@@ -42,12 +44,30 @@ docker run -d --name jsperfcom_web_man \
4244
jsperfcom_web
4345
```
4446

45-
#### Local
47+
#### Running jsPerf locally
48+
49+
It is also possible to run jsPerf locally without installing and using Docker.
50+
51+
##### Setup
52+
53+
You’ll need [Node.js](https://nodejs.org/en/) and [MySQL](https://dev.mysql.com/downloads/mysql/) installed.
54+
55+
Start the MySQL server, create a database, a user, and create the database-tables using the `tables.js` file. Replace with your own credentials.
56+
57+
```
58+
node setup/tables.js DB_ENV_MYSQL_PASSWORD=password DB_ENV_MYSQL_DATABASE=jsperf DB_ENV_MYSQL_USER=jsperf
59+
```
60+
61+
Add an entry to the hosts file to redirect jsPerf’s database connections to `localhost` (which is where MySQL is likely running) with the following:
62+
63+
```
64+
127.0.0.1 db
65+
```
4666

47-
You’ll need [node.js](https://nodejs.org/en/) and [MySQL](https://www.mysql.com/downloads/) installed.
67+
##### Running jsPerf
4868

4969
```
50-
npm start
70+
npm start DB_ENV_MYSQL_PASSWORD=password DB_ENV_MYSQL_DATABASE=jsperf DB_ENV_MYSQL_USER=jsperf
5171
```
5272

5373
## Testing

0 commit comments

Comments
 (0)