- "Robot Paths" available in https://github.com/LambdaSchool/CS1-Code-Challenges/tree/master/robotPaths
1st Lecture w/Tai Chulikavit: Review Code Challenge #28: stackOfPlates
Brown Bag w/Thomson Comer: The Hyper Text transfer Protocol
-
Protocol: a specific language
-
Inter-Processed Communication (IPC)
-
HTTP communicates over Sockets (there are also: pipes and named pipes, msg queueing, semaphores, shared memry and sockets)
-
Sockets allow two different processes to communicate
-
using
telnet
-
using
curl
> GET / HTTP/1.1 <--- get the root of google according to HTTP protocol > Host: www.google.com > User-Agent: curl/7.54.0 > Accept: */*
-
metadata... Header data...
-
make a dir, cd in
-
npm install express
-
server.js
/*******************
* express setup
********************/
const express = require('express');
const app = express();
/*******************
* server
********************/
const port = 8081;
const server = app.listen(port, () => {
console.log('server online');
});
/*******************
* endpoint
********************/
app.get('/', (request, response) => {
// console.log(req)
response.send('Hello, World!\n');
});
-
npm i --save express
(will make package-lock.json) -
node server.js
-
curl localhost:8081
-
Live Reload
-
Make server public on the internet with: ???