Skip to content

Commit

Permalink
0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
LomotHo committed Dec 28, 2019
1 parent 7c9eb94 commit 6d93496
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 226 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
# bedrock-console

## 运行
```
// 1. clone项目
git clone https://github.com/LomotHo/bedrock-console.git && cd bedrock-console
// 2. 创建bedrock文件夹,解压服务端程序到bedrock
mkdir bedrock && unzip bedrock-server-1.xx.xx.xx.zip
// 3.运行(要先安装nodejs)
node app.js
```

## 配置
#### 配置文件是config/index.js,当前可用项目:
- localPort: 控制台网页端口
- password: 控制台密码

## 使用

默认登录页面为:http://192.168.8.250:3000/index.html
7 changes: 4 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
const Koa = require('koa');
const app = new Koa();
const config = require('./config');
var server = require('http').createServer(app.callback())
var io = require('socket.io')(server);
var readline = require('readline');
var staticFiles = require('./util/static-flies');
var clientsocket = "";
var authenticated = false;
var client_token = "";
var password = "1234567890";
var password = config.password;

//Clear console
console.log('\033[2J');
Expand Down Expand Up @@ -104,6 +105,6 @@ rl.on('line', function (cmd) {
minecraftServerProcess.stdout.on('data', log);
minecraftServerProcess.stderr.on('data', log);

server.listen(19135, function(){
console.log('listening on *:19135');
server.listen(config.localPort, function(){
console.log(`listening on *:${config.localPort}`);
});
7 changes: 7 additions & 0 deletions config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var config = {
"localPort": 3000,
"password": "1234567890",
"apiPrefix": "/api/v1"
};

module.exports = config;
22 changes: 22 additions & 0 deletions doc/0.0.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# bedrock-console

## 运行
```
// 1. clone项目
git clone https://github.com/LomotHo/bedrock-console.git && cd bedrock-console
// 2. 创建bedrock文件夹,解压服务端程序到bedrock
mkdir bedrock && unzip bedrock-server-1.xx.xx.xx.zip
// 3.运行(要先安装nodejs)
node app.js
```

## 配置
#### 配置文件是config/index.js,当前可用项目:
- localPort: 控制台网页端口
- password: 控制台密码

## 使用

默认登录页面为:http://192.168.8.250:3000/index.html
222 changes: 0 additions & 222 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
},
"homepage": "https://github.com/LomotHo/bedrock-console#readme",
"dependencies": {
"express": "^4.17.1",
"koa": "^2.7.0",
"mime": "^2.4.4",
"mz": "^2.7.0",
Expand Down

0 comments on commit 6d93496

Please sign in to comment.