Remove python, replace with ts

This commit is contained in:
simojenki
2021-01-26 16:56:00 +11:00
parent 2fdaaf471f
commit 695b92c912
18 changed files with 2125 additions and 21 deletions

11
src/app.ts Normal file
View File

@@ -0,0 +1,11 @@
import {createServer} from './utils/server'
createServer()
.then(server => {
server.listen(3000, () => {
console.info(`Listening on http://localhost:3000`)
})
})
.catch(err => {
console.error(`Error: ${err}`)
})

10
src/utils/server.ts Normal file
View File

@@ -0,0 +1,10 @@
import express from 'express'
import {Express} from 'express-serve-static-core'
export async function createServer(): Promise<Express> {
const server = express()
server.get('/', (_, res) => {
res.send('Hello world!!!')
})
return server
}