Publicly availible at https://sample-chat.api.goooseman.ru/
npm start
to run the project in development modenpm run build && node dist/src/main
to run the project in production mode (or just use a pre-built Docker image)
A server has the following API.
const content: {
id: string;
userId: string;
text: string;
username: string;
createdAt: string; // ISO 8601
status: "none";
} = { ... };
await chatIO.emit("message", content, cb);
const Content: {
id: string;
userId: string;
text: string;
username: string;
createdAt: string; // ISO 8601
status: "none";
} = { ... };
await chatIO.emit("listMessages", (err?: Error, data: { items: Content[]} ) => { ... });
const Content: {
id: string;
userId: string;
text: string;
username: string;
createdAt: string; // ISO 8601
status: "none";
} = { ... };
chatIO.on("message", (data: Content) => { ... });
- Pagination
- Authorization
- Seen marks