This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
// https://expressjs.com/en/4x/api.html#res | |
const express = require("express"); | |
const app = express(); | |
const port = process.env.port || 3000; | |
app.set("view engine", "pug"); | |
app.set("views", process.cwd() + "/views"); | |
app.get("/", (req, res) => { | |
//handle route: get requests for "/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car { | |
constructor(options) { | |
this.doors = options.doors || 4; | |
this.state = options.state || "brand new"; | |
this.color = options.color || "silver"; | |
} | |
} | |
class Truck { | |
constructor(options) { |
OlderNewer