Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
464d4ed
update README with my version note
yafaja2023 Feb 19, 2026
5d4126d
add CI workflow
yafaja2023 Feb 19, 2026
12b58b0
update CI to show node version instead of forcing failure
yafaja2023 Feb 19, 2026
07fe60a
break test
yafaja2023 Feb 20, 2026
3c59c49
add coverage
yafaja2023 Feb 20, 2026
d35cf53
add CI badge
yafaja2023 Feb 20, 2026
7c3bbe1
add prettier formatting
yafaja2023 Feb 20, 2026
0776fd5
add style job to CI
yafaja2023 Feb 20, 2026
7d3c4e2
add style job to CI
yafaja2023 Feb 20, 2026
b085650
add style job to CI
yafaja2023 Feb 20, 2026
24a32b1
add style job to CI2
yafaja2023 Feb 20, 2026
5e04927
add style job to CI3
yafaja2023 Feb 20, 2026
82114c8
fix CI workflow final
yafaja2023 Feb 20, 2026
9cc9eeb
fix CI
yafaja2023 Feb 20, 2026
507e31d
add style job to CI3
yafaja2023 Feb 20, 2026
a2152b9
Add lint step to CI and test with unused function
yafaja2023 Feb 20, 2026
351c59a
Remove unused function to pass CI linting
yafaja2023 Feb 20, 2026
0508c0d
Fix YAML syntax for CI workflow
yafaja2023 Feb 20, 2026
0d2e6f9
Fix CI YAML with proper indentation and add lint step
yafaja2023 Feb 20, 2026
6a71234
Fix CI
yafaja2023 Feb 20, 2026
bfa96be
Fix CI
yafaja2023 Feb 20, 2026
cd43e1b
Fix CI
yafaja2023 Feb 20, 2026
13f850e
Add style job to CI
yafaja2023 Feb 20, 2026
babc159
add style check to CI
yafaja2023 Feb 20, 2026
907de32
add style check to CI2
yafaja2023 Feb 20, 2026
36f8fe7
add lint step to CI
yafaja2023 Feb 20, 2026
9d2442d
remove unused function
yafaja2023 Feb 20, 2026
9fe4de2
fix formatting issues
yafaja2023 Feb 20, 2026
14c3637
fail CI on lint warnings
yafaja2023 Feb 20, 2026
120e997
fail CI on lint warnings
yafaja2023 Feb 20, 2026
7e08b1a
fix security: use crypto.randomBytes for secure hash
yafaja2023 Feb 20, 2026
daf7e2c
new
yafaja2023 Feb 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: cd

on:
push:
branches: [main]

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: npm ci

- name: Build app
run: npm run build
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: ci

on:
push:
pull_request:

jobs:
tests:
name: Tests
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

style:
name: Style
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: npm ci

- name: Check formatting
run: npm run format:check

- name: Check linting
run: npm run lint -- --max-warnings=0
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules/
coverage/
dist/
.env
.vscode
node_modules/
coverage/
dist/
.env
.vscode
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM --platform=linux/amd64 node:22-slim

WORKDIR /usr/src/app

ADD . .

RUN npm ci

RUN npm run build

CMD ["node", "dist/main.js"]
FROM --platform=linux/amd64 node:22-slim
WORKDIR /usr/src/app
ADD . .
RUN npm ci
RUN npm run build
CMD ["node", "dist/main.js"]
51 changes: 27 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
# learn-cicd-typescript-starter (Notely)

This repo contains the typescript starter code for the "Notely" application for the "Learn CICD" course on [Boot.dev](https://boot.dev).

## Local Development

Make sure you're on Node version 22+.

Create a `.env` file in the root of the project with the following contents:

```bash
PORT="8080"
```

Run the server:

```bash
npm install
npm run dev
```

_This starts the server in non-database mode._ It will serve a simple webpage at `http://localhost:8080`.

You do _not_ need to set up a database or any interactivity on the webpage yet. Instructions for that will come later in the course!
![CI Status](https://github.com/yafaja2023/learn-cicd-typescript-starter/actions/workflows/ci.yml/badge.svg)

# learn-cicd-typescript-starter (Notely)

This repo contains the typescript starter code for the "Notely" application for the "Learn CICD" course on [Boot.dev](https://boot.dev).

## Local Development

Make sure you're on Node version 22+.

Create a `.env` file in the root of the project with the following contents:

```bash
PORT="8080"
```

Run the server:

```bash
npm install
npm run dev
```

_This starts the server in non-database mode._ It will serve a simple webpage at `http://localhost:8080`.

You do _not_ need to set up a database or any interactivity on the webpage yet. Instructions for that will come later in the course!
Yafa's version of Boot.dev's Notely app..
24 changes: 12 additions & 12 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { defineConfig } from "drizzle-kit";

import { config } from "./src/config";

export default defineConfig({
out: "./src/db/migrations",
schema: "./src/db/schema.ts",
dialect: "turso",
dbCredentials: {
url: config.db.url || "",
},
});
import { defineConfig } from "drizzle-kit";
import { config } from "./src/config";
export default defineConfig({
out: "./src/db/migrations",
schema: "./src/db/schema.ts",
dialect: "turso",
dbCredentials: {
url: config.db.url || "",
},
});
23 changes: 23 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import { defineConfig } from "eslint/config";
import pluginSecurity from "eslint-plugin-security";

export default defineConfig([
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { js },
extends: ["js/recommended"],
rules: {
"security/detect-eval-with-expression": "error",
},
},
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: { globals: globals.node },
},

tseslint.configs.recommended,
pluginSecurity.configs.recommended,
]);
Loading