Skip to content

Commit aa3785b

Browse files
committed
fix server import
1 parent 1962a87 commit aa3785b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ A minecraft client running in a web page.
99
It runs mineflayer in the browser which connects to a websocket minecraft server.
1010
It provides a simple websocket to tcp proxy as a backend to make it possible to connect to any minecraft server.
1111

12+
## Usage
13+
14+
`npm install -g prismarine-web-client` then run `prismarine-web-client` then open `http://localhost:8080` in your browser
15+
1216
## Features
1317

1418
* display blocks
@@ -20,7 +24,7 @@ It provides a simple websocket to tcp proxy as a backend to make it possible to
2024
* chat
2125
* block placing and breaking
2226

23-
## Run
27+
## Development
2428

2529
```js
2630
npm install

server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const netApi = require('net-browserify')
55
const bodyParser = require('body-parser')
66
const request = require('request')
77
const compression = require('compression')
8+
const path = require('path')
89

910
// Create our app
1011
const app = express()
@@ -27,7 +28,7 @@ app.use(function (req, res, next) {
2728

2829
app.use(compression())
2930
app.use(netApi())
30-
app.use(express.static('./public'))
31+
app.use(express.static(path.join(__dirname, './public')))
3132

3233
app.use(bodyParser.json({ limit: '100kb' }))
3334

0 commit comments

Comments
 (0)