Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
cm-ayf committed Aug 20, 2022
1 parent 571600c commit 03d6e49
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# template

Template Repository for TypeScript & Node.js Application - with strictest possible code quality

## features

- `pnpm` package manager
- TypeScript
- extends `@tsconfig/strictest`
- top-level await enabled
- ESLint
- many plugins & rules from `@typescript-eslint` enabled
- Prettier
- default setting except for `singleQuote`
- Husky & lint-staged
- automatically type-check & lint & format before commits
- Webpack
- enables top-level await
- creates single self-contained `main.cjs` - free from `node_modules`
- Docker

## scripts

- `pnpm dev` - start testing without build
- `pnpm build` - creates `dist/main.cjs` (commonjs)
- `pnpm start` - executes `dist/main.cjs`

## deploy

### non-Docker

```sh
git clone <repository>
pnpm install [--frozen-lockfile]
pnpm build

scp dist/main.mjs your-server:main.js
ssh your-server "node main.js"
```

### Docker

```sh
git clone <repository>
docker build -t <name> .
docker tag <name> <location/repository:tag>
docker push <location/repository:tag>
```

0 comments on commit 03d6e49

Please sign in to comment.