Podpora mock dat pro vývoj o víkendech

This commit is contained in:
2023-06-03 09:24:36 +02:00
parent b438d2112a
commit c814624dbc
10 changed files with 58 additions and 17 deletions

View File

@@ -4,6 +4,11 @@ import bodyParser from "body-parser";
import { fetchFood, fetchPizzy } from "./chefie";
import cors from 'cors';
import { getData, updateChoice } from "./service";
import dotenv from 'dotenv';
import path from 'path';
const ENVIRONMENT = process.env.NODE_ENV || 'production'
dotenv.config({ path: path.resolve(__dirname, `../.env.${ENVIRONMENT}`) });
const app = express();
const server = require("http").createServer(app);