generated from template/auto-template
init
This commit is contained in:
17
backend/src/main.ts
Normal file
17
backend/src/main.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { app } from './app.ts'
|
||||
import './router/index.ts';
|
||||
import { HOME } from './config.ts';
|
||||
import { proxyRoute, initProxy } from '@kevisual/local-proxy/proxy.ts';
|
||||
|
||||
export { app }
|
||||
if (require.main === module) {
|
||||
initProxy({
|
||||
pagesDir: './public',
|
||||
watch: true,
|
||||
home: `/root/${HOME}`
|
||||
});
|
||||
app.listen(9000, () => {
|
||||
console.log('Server is running on http://localhost:9000');
|
||||
});
|
||||
app.onServerRequest(proxyRoute);
|
||||
}
|
||||
Reference in New Issue
Block a user