Script publishing
This commit is contained in:
parent
a4fdf12838
commit
affee943d9
|
@ -1,8 +1,21 @@
|
|||
"use strict";
|
||||
|
||||
let http = require("http");
|
||||
let express = require("express");
|
||||
let compression = require("compression");
|
||||
let server = http.createServer();
|
||||
let app = express();
|
||||
server.addListener("request", app);
|
||||
app.use(compression({
|
||||
level: 9
|
||||
}));
|
||||
server.listen(8282,'0.0.0.0',() => {
|
||||
console.log("HTTP Service Running...");
|
||||
});
|
||||
exports.http = server;
|
||||
|
||||
|
||||
let {resolve} = require("path");
|
||||
app.get("/script",(request, response)=>{
|
||||
response.sendFile(resolve("./script/wsjs.js"))
|
||||
});
|
File diff suppressed because it is too large
Load Diff
|
@ -19,6 +19,8 @@
|
|||
"author": "Abdussamed ULUTAŞ <abdussamedulutas@yandex.com.tr>",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"compression": "^1.7.4",
|
||||
"express": "^4.18.2",
|
||||
"joi": "^17.7.0",
|
||||
"knex": "^2.3.0",
|
||||
"sqlite3": "^5.1.2",
|
||||
|
|
|
@ -114,15 +114,6 @@ WSJS.prototype.sendRaw = function(obj){
|
|||
this.ws.send(JSON.stringify(obj))
|
||||
};
|
||||
}
|
||||
/*
|
||||
WSJS.prototype.checkAuth = async function(username, password){
|
||||
return false;
|
||||
let {value:isAuth} = await this.request({
|
||||
type: 'auth/check'
|
||||
});
|
||||
return isAuth;
|
||||
};
|
||||
*/
|
||||
WSJS.prototype.authWith = async function(username, password){
|
||||
await this.request({
|
||||
type: 'auth/login',
|
Loading…
Reference in New Issue