1. Make sure you have surge installed globally
npm install -g surge
2. Run the Create React App build
cd your-react-project
npm run build
Cook My Pantry is a mobile app that will give users an easy way to find recipes based on the ingredients in their pantry
Often when you find yourself in the mood to cook, you can only find recipes that would require a trip to the grocery store. However, more likely than not, your pantry contains plenty of ingredients to create a delicious dish.
This app will give users the ability to filter online recipes that only contain items they currently have in their pantry. They won't have to make an extra trip to the store and have the opportunity to use ingredients they may not cook with very often.
- press "i" | |
- write your merge message | |
- press "esc" | |
- write ":wq" | |
- then press enter |
**Primary Key** - must be unique, something that is not reproduced anywhere else in a table; can be used to reference this table in other tables | |
**Foreign Key** - key used from another table | |
**table relationships** | |
- 1 to 1 (character to wand) | |
- 1 to many (character can only be in one house, house can have many characters) | |
- many to many (characters to books, character in multiple books, one book has multiple characters) | |
**Entity Relationship Diagram** | |
______________________________ |
const apiUrl = '' | |
fetch('apiUrl') | |
.then(response => response.json()) | |
.then(data => console.log(data)) |
exports.up = function(knex, Promise) { | |
return knex.schema.createTable('tablename', function(table) { | |
// TABLE COLUMN DEFINITIONS HERE | |
table.increments() | |
table.string('colname1', 255).notNullable().defaultTo('') | |
table.string('colname2', 255).notNullable().defaultTo('') | |
table.string('colname3', 255).notNullable().defaultTo('') | |
table.timestamps(true, true) | |
// OR | |
// table.dateTime('created_at').notNullable().defaultTo(knex.raw('now()')) |
module.exports = { | |
development: { | |
client: 'pg', | |
connection: 'postgres://localhost/dbname-dev' | |
}, | |
test: {}, | |
production: { | |
client: 'pg', | |
connection: process.env.DATABASE_URL | |
} |