Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b28fca5
pr
JadynWor Oct 19, 2025
54c6d94
workflows
JadynWor Oct 19, 2025
1838758
workflows
JadynWor Oct 19, 2025
e1a06cd
Update CI workflow to check Node version instead of failing
JadynWor Oct 19, 2025
f74d7c9
dfd
JadynWor Oct 19, 2025
ee2302e
dfd
JadynWor Oct 19, 2025
87257ec
dfd
JadynWor Oct 19, 2025
86b5ee3
dfd
JadynWor Oct 19, 2025
7175623
final test
JadynWor Oct 19, 2025
fcbf4d4
Fix CI: Remove platform-specific libsql dependency and add npm cache
JadynWor Oct 19, 2025
f1c9e4d
final test
JadynWor Oct 19, 2025
c13c57e
final test
JadynWor Oct 19, 2025
51e0fd7
final test
JadynWor Oct 19, 2025
7067eb6
Add test status badge to README
JadynWor Oct 19, 2025
c403731
final test
JadynWor Oct 19, 2025
b4ac391
final test
JadynWor Oct 19, 2025
6c3f23e
format
JadynWor Oct 19, 2025
5306c3e
format
JadynWor Oct 19, 2025
df93fda
format
JadynWor Oct 19, 2025
2e375b6
format
JadynWor Oct 19, 2025
f5f34fa
lint
JadynWor Oct 19, 2025
4b20dda
lint
JadynWor Oct 19, 2025
b162e5f
lint
JadynWor Oct 19, 2025
74321a1
lint
JadynWor Oct 19, 2025
1ab9a9e
lint
JadynWor Oct 19, 2025
37e749f
Fix security issue: Replace crypto.pseudoRandomBytes with crypto.rand…
JadynWor Oct 19, 2025
1ee12ad
cd
JadynWor Oct 20, 2025
6a4aab6
docker
JadynWor Oct 20, 2025
8e2defd
docker build
JadynWor Oct 20, 2025
1a62211
docker build
JadynWor Oct 20, 2025
b0be4f9
npm run test
JadynWor Oct 20, 2025
3f60871
npm run test
JadynWor Oct 20, 2025
c9e8d64
npm run test
JadynWor Oct 20, 2025
371de1e
npm run test
JadynWor Oct 20, 2025
a38f256
deploy
JadynWor Oct 22, 2025
ac0a412
h1 header
JadynWor Oct 22, 2025
8be73bc
h1 header
JadynWor Oct 22, 2025
d3eb696
worked deployment
JadynWor Oct 22, 2025
d3b5008
worked deployment
JadynWor Oct 22, 2025
a5fc70d
worked deployment
JadynWor Oct 22, 2025
2c068f3
worked deployment
JadynWor Oct 22, 2025
1a495a9
worked deployment
JadynWor Oct 22, 2025
baf8ae5
worked deployment
JadynWor Oct 22, 2025
ec26706
worked deployment
JadynWor Oct 22, 2025
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: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: Install dependencies
run: npm ci

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

on:
pull_request:
branches: [main]

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
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run 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

- name: Check linting max warnings
run: npm run lint -- --max-warnings=0

- name: Check coverage
run: npm run test

- name: Run build
run: npm run build
20 changes: 15 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
node_modules/
coverage/
dist/
.env
.vscode
@'
node_modules
npm-debug.log
yarn.lock
pnpm-lock.yaml
.git
.gitignore
.vscode
dist
build
coverage
*.log
.env
.env.*
'@ | Set-Content -Encoding UTF8 .dockerignore
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:18-slim

WORKDIR /usr/src/app

ADD . .

RUN npm ci

RUN npm run build

CMD ["node", "dist/main.js"]
FROM --platform=linux/amd64 node:18-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 18+.

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!
# learn-cicd-typescript-starter (Notely)

![code coverage badge](https://github.com/JadynWor/learn-cicd-typescript-starter/actions/workflows/ci.yml/badge.svg)

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 18+.

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!
KIXZIN
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: process.env.DATABASE_URL || "", // use the DATABASE_URL environment variable
}, //
});
19 changes: 19 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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"],
},
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: { globals: globals.node },
},
tseslint.configs.recommended,
pluginSecurity.configs.recommended,
]);
Empty file added local.db
Empty file.
Loading