tuned header of recipe lists for smartphones
This commit is contained in:
parent
5c3c74b32e
commit
686eddbaee
24 changed files with 2563 additions and 29 deletions
|
|
@ -4,7 +4,12 @@ import { v4 as uuidv4 } from "uuid";
|
|||
|
||||
import { recipes } from "./mock_data/recipes"
|
||||
import { Recipe } from "./types/recipe"
|
||||
import { config } from "dotenv";
|
||||
|
||||
// Load config from .env (fallbacks if missing)
|
||||
config()
|
||||
const PORT = process.env.PORT ? parseInt(process.env.PORT) : 4000;
|
||||
const HOST = process.env.HOST || "localhost";
|
||||
|
||||
const app = express();
|
||||
app.use(cors());
|
||||
|
|
@ -71,5 +76,6 @@ app.delete("/recipe/:id", (req, res) => {
|
|||
res.status(204).send();
|
||||
});
|
||||
|
||||
app.listen(4000, () => console.log("Server running on http://localhost:4000"));
|
||||
|
||||
app.listen(PORT, HOST, () => {
|
||||
console.log(`Server running on http://${HOST}:${PORT}`);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue