mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-10 15:37:58 -05:00
20 lines
382 B
TypeScript
20 lines
382 B
TypeScript
import { createServer } from "http";
|
|
import { createApplication } from "./app";
|
|
import { InMemoryTodoRepository } from "./todo-management/todo.repository";
|
|
|
|
const httpServer = createServer();
|
|
|
|
createApplication(
|
|
httpServer,
|
|
{
|
|
todoRepository: new InMemoryTodoRepository(),
|
|
},
|
|
{
|
|
cors: {
|
|
origin: ["http://localhost:4200"],
|
|
},
|
|
}
|
|
);
|
|
|
|
httpServer.listen(3000);
|