chore(nx): create empty project for server

This commit is contained in:
Elian Doran
2025-04-22 17:13:17 +03:00
parent a10a4ba17d
commit 9c0d42252e
24 changed files with 21154 additions and 3856 deletions

21
apps/server/src/main.ts Normal file
View File

@@ -0,0 +1,21 @@
/**
* This is not a production server yet!
* This is only a minimal backend to get started.
*/
import express from 'express';
import * as path from 'path';
const app = express();
app.use('/assets', express.static(path.join(__dirname, 'assets')));
app.get('/api', (req, res) => {
res.send({ message: 'Welcome to server!' });
});
const port = process.env.PORT || 3333;
const server = app.listen(port, () => {
console.log(`Listening at http://localhost:${port}/api`);
});
server.on('error', console.error);