14 lines
282 B
TypeScript
14 lines
282 B
TypeScript
import dotenv from 'dotenv';
|
|
|
|
import app from './app';
|
|
import { connection } from './database/database.connection';
|
|
|
|
dotenv.config();
|
|
|
|
const PORT: number = Number(process.env.PORT) || 9000;
|
|
|
|
connection.then(
|
|
() => app.listen(PORT),
|
|
(err) => console.error('ERROR!', err),
|
|
);
|