18 lines
558 B
TypeScript
18 lines
558 B
TypeScript
import { useConfig } from '@kevisual/use-config';
|
|
import { app } from './app.ts';
|
|
import './route.ts';
|
|
const config = useConfig();
|
|
// import { app as aiApp } from '@kevisual/ai-lang/src/index.ts';
|
|
import { uploadMiddleware } from './routes-simple/upload.ts';
|
|
import { loadApps } from './load-apps.ts';
|
|
// export { aiApp };
|
|
export { app };
|
|
loadApps(app);
|
|
|
|
// if (import.meta.url === `file://${process.argv[1]}`) {
|
|
app.listen(config.port, () => {
|
|
console.log(`server is running at http://localhost:${config.port}`);
|
|
});
|
|
app.server.on(uploadMiddleware);
|
|
// }
|