1
Fork 0
solar-conflux/typescript/translucid/QuickServer.ts
Matei Adriel 4c45df126c
typescript(translucid): added all
Signed-off-by: prescientmoon <git@moonythm.dev>
2019-01-19 22:49:47 +02:00

27 lines
573 B
TypeScript

const express = require('express');
const http = require('http');
import {Translucid} from "./Translucid";
interface Server{
app:any,
server:any,
connect:Promise<any>
}
function QuickServer(port:number):any{
const app = express();
const server = http.Server(app);
const translucid = new Translucid(app);
return {
express,app,http,server,translucid,
connect:new Promise((resolve,reject) => {
server.listen(port,() => {
resolve("Connected");
});
})
}
}
export {QuickServer};