mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Remove python, replace with ts
This commit is contained in:
11
src/app.ts
Normal file
11
src/app.ts
Normal 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
10
src/utils/server.ts
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user