Skip to content

Commit

Permalink
fix server import
Browse files Browse the repository at this point in the history
  • Loading branch information
rom1504 committed Feb 27, 2021
1 parent 1962a87 commit aa3785b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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' }))

Expand Down

0 comments on commit aa3785b

Please sign in to comment.