Capstone topics from the end of the program: how to set up a full-stack backend project, work with npm and Git, test APIs with Postman or curl, apply layering and REST habits, and prepare for deployment and the mock interview. These patterns tie Express, SQL, and deployment lessons into day-to-day engineering practice.

Project & repo setup

Clone starters, install dependencies, configure package.json scripts, and understand the standard src/ layout before writing feature code.

4 topic(s) on this page.

How to organize a Node/Express project — Basic

Separate app entry, routers, controllers, services, and database code into predictable folders.
Learn: A consistent folder layout helps you find code quickly and mirrors how professional teams organize Express APIs. Each resource gets router + controller + service files; shared pieces (db, errors, config) live at the top level.

Supplementary examples

Adding a new resource (tags)

src/tags/
  tags.router.js      # URLs only
  tags.controller.js  # req/res
  tags.service.js     # Knex queries

Course example

src/
  app.js                 # Express app + global middleware
  server.js              # listen(PORT)
  config/                # logger, env helpers
  errors/                # notFound, errorHandler
  db/                    # knex connection, migrations, seeds
  users/
    users.router.js
    users.controller.js
    users.service.js

Additional references & examples

How to use npm scripts in package.json — Basic

Standard scripts to start the server, run migrations, and seed the database.
Learn: npm scripts are the team’s shared commands—everyone runs the same start and migrate steps. Document them in README so onboarding takes minutes, not hours.

Supplementary examples

Run migrations before start in dev

# package.json
"scripts": {
  "dev:reset": "knex migrate:rollback --all && knex migrate:latest && knex seed:run && nodemon src/server.js"
}

Course example

{
  "scripts": {
    "start": "node src/server.js",
    "dev": "nodemon src/server.js",
    "migrate": "knex migrate:latest",
    "seed": "knex seed:run"
  }
}

Additional references & examples

How to work from a starter repository — Basic

Clone the program starter, install dependencies, copy .env.example, and run locally before customizing.
Learn: Starters encode conventions the course expects. Clone, install, configure .env, migrate, and seed before changing behavior—prove the baseline works, then implement features incrementally.

Supplementary examples

.env.example fields (typical)

DATABASE_URL=postgresql://user:pass@localhost:5432/dbname
PORT=5001
LOG_LEVEL=debug
NODE_ENV=development

Course example

git clone <starter-repo-url>
cd <project-folder>
npm install
cp .env.example .env   # then fill in DATABASE_URL, PORT, etc.
npm run migrate
npm run seed
npm start

Additional references & examples

How to deploy a Node API (high level) — Intermediate

Push to GitHub, connect host (e.g. Render), set env vars, run migrations, confirm health endpoint and CORS for the frontend origin.
Learn: Deployment connects Git, hosting, database, and frontend CORS. The same repo runs locally with .env and in production with host-managed secrets—never commit real credentials.

Supplementary examples

Production env on Render (typical)

NODE_ENV=production
DATABASE_URL=<render-postgres-url>
PORT=10000
FRONTEND_URL=https://your-app.onrender.com

Course example

# Deployment checklist
# 1. .env values set on host (DATABASE_URL, PORT, NODE_ENV=production)
# 2. Build command: npm install
# 3. Start command: npm start
# 4. Run knex migrate:latest against production DB
# 5. Smoke test: GET /health or GET /

Additional references & examples