feat: refactored server to use ts and improved folder structure

This commit is contained in:
Roberto Tonino
2021-04-03 19:46:54 +02:00
parent f98abb384c
commit 8e4e2ff5eb
43 changed files with 4125 additions and 452 deletions

View File

@@ -0,0 +1,3 @@
import sample from './sample'
export default [sample]

View File

@@ -0,0 +1,11 @@
import { ApiHandler } from '../../../types'
const path: ApiHandler['path'] = '/sample'
const handler: ApiHandler['handler'] = (_, res) => {
res.send('Mandi')
}
const apiHandler: ApiHandler = { path, handler }
export default apiHandler