Work in progress.

PostgreSQL / PGAdmin

​CREATE TABLE phones (
​name VARCHAR(50),
​manufacturer VARCHAR(50),
​price INTEGER,
​units_sold INTEGER,
INSERT INTO phones (name, manufacturer, price, units_sold)
('N8', 'Nokia', 150, 7543),
('Droid', 'Motorola', 150, 8395),
('Wave S8500', 'Samsung', 175, 9259);
​area NOT IN(3043, 8223)
​OR name = 'Delhi'
​OR name = 'Tokyo';
​price * unit sold AS total_revenue
​price * unit sold > 1000000;
INSERT INTO cities (name, country, population, area)
  1. make a frontend directory (be sure to link your index.html, app.js, app.css)
rails new --api -d=postgresql backend_auth_1st_attempt
  1. fix cors errors
uncomment bcrypt
bundle add jwt to add jwt to your back end directory
run bundle install
create user with rails g resource, get password digest, username, password
rails g resource username email password:digest
rails d resourcepassword:digest should generate has_secure_password in your user model, rails magic to show t.string :password_digest in your migration table, you better not do a password_digest when you create your seeds
rails db create migrate
test - seed and console
User.create(name: "", password: "")


Excited to learn, and even happier to teach.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store