diff --git a/README.md b/README.md index c334a3435..a43eabf53 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ A minecraft client running in a web page. It runs mineflayer in the browser which connects to a websocket minecraft server. It provides a simple websocket to tcp proxy as a backend to make it possible to connect to any minecraft server. +## Usage + +`npm install -g prismarine-web-client` then run `prismarine-web-client` then open `http://localhost:8080` in your browser + ## Features * display blocks @@ -20,7 +24,7 @@ It provides a simple websocket to tcp proxy as a backend to make it possible to * chat * block placing and breaking -## Run +## Development ```js npm install diff --git a/server.js b/server.js index 929ed653f..6365ca090 100644 --- a/server.js +++ b/server.js @@ -5,6 +5,7 @@ const netApi = require('net-browserify') const bodyParser = require('body-parser') const request = require('request') const compression = require('compression') +const path = require('path') // Create our app const app = express() @@ -27,7 +28,7 @@ app.use(function (req, res, next) { app.use(compression()) app.use(netApi()) -app.use(express.static('./public')) +app.use(express.static(path.join(__dirname, './public'))) app.use(bodyParser.json({ limit: '100kb' }))