typescript(translucid): first commit
Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
parent
507091e37f
commit
62b1390b18
8 changed files with 498 additions and 0 deletions
typescript/translucid
19
typescript/translucid/QuickServer.js
Normal file
19
typescript/translucid/QuickServer.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const express = require('express');
|
||||
const http = require('http');
|
||||
const Translucid_1 = require("./Translucid");
|
||||
function QuickServer(port) {
|
||||
const app = express();
|
||||
const server = http.Server(app);
|
||||
const translucid = new Translucid_1.Translucid(app);
|
||||
return {
|
||||
express, app, http, server, translucid,
|
||||
connect: new Promise((resolve, reject) => {
|
||||
server.listen(port, () => {
|
||||
resolve("Connected");
|
||||
});
|
||||
})
|
||||
};
|
||||
}
|
||||
exports.QuickServer = QuickServer;
|
Loading…
Add table
Add a link
Reference in a new issue