To be used with backend-strecth repo
-
Clone down this repo.
-
CD into this repo.
-
Run
npm install. -
Run
npm startto start the server.
-
Once you download your SQL (PostgreSQL, mySQL, SQLite3), configure the
knexfile.jswith your specific SQL connection configurations -
Run
npm run devto migrate and seed tables
- Express.js, Knex.js, PostgreSQL on back-end
- Vite/React, Cypress, React Router on front-end
URL: http://localhost:3001/foodnames
Sample response (200):
{
"fdc_id": "344604",
"brand_name": "",
"ingredients": "Tomatoes, Tomato Juice, Less Than 2% Of: Salt, Dried Onion, Dried Garlic, Soybean Oil, Spices, Calcium Chloride, Natural Flavor, Olive Oil, Citric Acid.",
"serving_size": 123,
"serving_size_unit": "g",
"branded_food_category": "",
"description": "Tutturosso Green 14.5oz. NSA Italian Diced Tomatoes"
}Sample response (500):
Internal Server Response Error