create-express-typescript-application
Version:
Create a new lightweight Express application with TypeScript
21 lines (17 loc) • 515 B
text/typescript
import { Controller, Get, Route, Tags } from 'tsoa';
import { getRoutes } from './server.status.service';
('Server Status')
('/api/server-status')
export class ServerStatusController extends Controller {
('/')
public async getServerStatus(): Promise<{ status: string, serverTime: string }> {
return {
"status": "server is running",
"serverTime": new Date().toISOString()
}
}
('/routes')
public async getServerRoutes(): Promise<any> {
return getRoutes()
}
}