$_: can use this to get what you just typed back in the console
package.JSON: where all the metadata about the project is created
Node_modules: stores all the packages necessary for your code
Yarn: tool for interacting with NPM registry; command line type tool to bring registry to your local machine and install the packages
Yarn.lock: autogenerated by yarn
Yarn install: will look at your yarn lock, see what you need, and pull what you need from NPM when you run it
Don't commit your node modules to source control
Common name for frontend folder is 'public' or 'static'
Use 'touch' to create a new folder
Index.js vs Script.js operate in a totally different context; index.js is what you do on your server, while script.js is code that runs on the client computer/must always be javascript
SQL
Use SQL to save things in databases, rather than on a server; we are able to then use this database to retrieve data when we want it
Heroku: hosting platform (uses AWS under the hood), is user friendly, charges you to use it
Postgres: database that uses SQL
% is like a wildcard in SQL
How to create a table in a database:
CREATE TABLE table_name ( (id serial primary key, (first_name varchar(128), (last_name varchar(128), (age integer not null, (sql_confidence > 0), check (sql_confidence <= 10), );
If this works it will show CREATE TABLE
To insert into table:
INSERT INTO table_name (first_name, last_name, age, sql_confidence) VALUES ('Alex', 'Krolak', 25, 3);
Today I Learned...
Node.JS
SQL
CREATE TABLE table_name ( (id serial primary key, (first_name varchar(128), (last_name varchar(128), (age integer not null, (sql_confidence > 0), check (sql_confidence <= 10), );
If this works it will show CREATE TABLEINSERT INTO table_name (first_name, last_name, age, sql_confidence) VALUES ('Alex', 'Krolak', 25, 3);