Ulak-Server/app.js
2026-04-25 09:25:16 +03:00

30 lines
585 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const express = require('express');
const app = express();
const dotenv = require('dotenv');
dotenv.config();
// DB
const sequelize = require('./data/db');
require('./models/accounts');
require('./models/messages');
require('./models/chats');
require('./data/database/relations');
// USES
app.use(express.json());
// ROUTES
app.use('/api/v1', require('./routers/app'));
app.get('/', (req, res) => {
res.send('1');
});
(async () => {
await sequelize.sync({ force: false });
})();
app.listen(4242, () => {
console.log("4242 portunda sunucu çalıştırıldıı.");
});