Caretaker Express · PostgreSQL · Cedar

Checkpoint · Lesson 1.1

npm init and a first Express server: checkpoint files

Git tag in the reference repository
lesson/m01-l01 (commit d2d3f13)
Replay result
All steps replayed from an empty folder
Tests at this point
no test suite yet

Compare your folder with the reference using Git, if you cloned it: git diff lesson/m01-l01 -- src.

Files changed in this lesson

.gitignore added

.gitignore
node_modules/.env

.npmrc added

.npmrc
save-exact=true

package-lock.json added

Generated by npm from package.json. Do not edit it by hand; run the npm commands from the lesson.

package.json added

package.json
{  "name": "caretaker",  "version": "1.0.0",  "description": "",  "scripts": {    "test": "echo \"Error: no test specified\" && exit 1",    "start": "node src/server.js"  },  "keywords": [],  "author": "",  "license": "ISC",  "type": "module",  "dependencies": {    "express": "5.3.0"  }}

src/server.js added

src/server.js
import express from 'express'; const app = express();const port = 3000; app.get('/', (req, res) => {  res.send('Caretaker is running');}); app.listen(port, () => {  console.log(`Caretaker listening on http://localhost:${port}`);});

Project tree at this checkpoint

.gitignore
.npmrc
package-lock.json
package.json
src/server.js

Back to lesson 1.1