init typescript
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
import express from 'express';
|
||||
import color from 'chalk';
|
||||
import cors from 'cors';
|
||||
import dotenv from 'dotenv';
|
||||
|
||||
dotenv.config(); // Sensible Konfigurationsvariablen in .env Datei auslagern
|
||||
|
||||
// Model
|
||||
import ProductModel from './model/ProductModel.js'; // Dateiendung nicht vergessen
|
||||
|
||||
const PORT = 8000;
|
||||
const HOST = '127.0.0.1'; // 'localhost'
|
||||
const PORT = process.env.SERVER_PORT; // || 8000;
|
||||
const HOST = process.env.SERVER_HOST; // || '127.0.0.1'; // 'localhost'
|
||||
const BASE_URL = `http://${HOST}:${PORT}`;
|
||||
|
||||
const app = express();
|
||||
|
||||
Reference in New Issue
Block a user