Closed romebell closed 3 years ago
@romebell
Ashton
Lev
Corey
I am all caught up now. I am good thanks.
I didn't add the VALUES before closing
carolinaurrea=# \connect testdb;
You are now connected to database "testdb" as user "carolinaurrea".
testdb=# CREATE TABLE students (
testdb(# id SERIAL PRIMARY KEY,
testdb(# name TEXT
testdb(# );
CREATE TABLE
testdb=# INSERT INTO students
testdb-# (name, phone, email)
testdb-# VALUES
testdb-# ('William', '(415)777-8888', 'william@ga.co');
ERROR: column "phone" of relation "students" does not exist
LINE 2: (name, phone, email)
Carolina, you have a few options. You can drop the students table and recreate it including the phone column. You can also use a command like this which we're not officially covering this morning, but it's good to know:
ALTER TABLE students ADD phone text
There is documentation for it here: https://www.w3schools.com/sql/sql_alter.asp
Was able to Drop and restart the process.
const express = require('express')
const app = express()
app.get('/', function(req, res) {
res.send('Hello, world!')
})
app.listen(8000)
@romebell
@romebell
remove the function
keyword when using =>
. They're just different ways to write a function. Either will work here, but they can't be combined.
app.get('/blog', (req, res) => {
res.send('Welcome to my blog');
});
I am getting this error when I try to run nodemon index.js on an other terminal
@canourrea23 You have a server already running.
Admin 👀 - [admin] is looking into it 👍 - [admin] Answer issue. Looks good. Code works.
Students 🚀 - [student] I get it! 😕 - [student] Still confused 😄 - [student] A simple error 🎉 - [student] My code now works
Admin/Students ❤️ - [student/admin] Love the topic or code snippet 👎 - [student/admin] Code didn't work