Skip to content

Commit a1c049f

Browse files
committed
first blood
0 parents  commit a1c049f

25 files changed

+683
-0
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# https://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = tab
7+
charset = utf-8
8+
end_of_line = lf
9+
indent_size = 4
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PORT=3000
2+
JWT_SECRET_KEY=4Z9pB2cT8aX7fN6qR5vY3gH1jM0wE2sD

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PORT=3000
2+
JWT_SECRET_KEY=4Z9pB2cT8aX7fN6qR5vY3gH1jM0wE2sD

.eslintrc.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
project: 'tsconfig.json',
5+
tsconfigRootDir: __dirname,
6+
sourceType: 'module',
7+
},
8+
plugins: ['@typescript-eslint/eslint-plugin'],
9+
extends: [
10+
'plugin:@typescript-eslint/recommended',
11+
'plugin:prettier/recommended',
12+
],
13+
root: true,
14+
env: {
15+
node: true,
16+
jest: true,
17+
},
18+
ignorePatterns: ['.eslintrc.js'],
19+
rules: {
20+
'@typescript-eslint/interface-name-prefix': 'off',
21+
'@typescript-eslint/explicit-function-return-type': 'off',
22+
'@typescript-eslint/explicit-module-boundary-types': 'off',
23+
'@typescript-eslint/no-explicit-any': 'off',
24+
},
25+
};

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env.local
29+
.env.development.local
30+
.env.test.local
31+
.env.production.local
32+
33+
# vercel
34+
.vercel
35+
36+
**/*.trace
37+
**/*.zip
38+
**/*.tar.gz
39+
**/*.tgz
40+
**/*.log
41+
package-lock.json
42+
**/*.bun

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run format

.prettierrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"singleQuote": false,
3+
"printWidth": 120,
4+
"proseWrap": "always",
5+
"tabWidth": 4,
6+
"useTabs": false,
7+
"parser": "typescript",
8+
"trailingComma": "all",
9+
"bracketSpacing": true,
10+
"semi": true,
11+
"endOfLine": "lf",
12+
"arrowParens": "always"
13+
}

.vscode/.settings.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"workbench.iconTheme": "material-icon-theme",
3+
"workbench.colorTheme": "Omni",
4+
"[jsonc]": {
5+
"editor.defaultFormatter": "vscode.json-language-features"
6+
},
7+
"workbench.editor.wrapTabs": true,
8+
"diffEditor.ignoreTrimWhitespace": false,
9+
"workbench.statusBar.visible": true,
10+
"explorer.confirmDelete": true,
11+
"editor.suggestSelection": "first",
12+
"javascript.updateImportsOnFileMove.enabled": "always",
13+
"typescript.updateImportsOnFileMove.enabled": "always",
14+
"editor.formatOnPaste": true,
15+
"json.format.keepLines": false,
16+
"editor.codeActionsOnSave": {
17+
"source.fixAll": "explicit"
18+
},
19+
"javascript.format.insertSpaceBeforeFunctionParenthesis": false,
20+
"javascript.format.placeOpenBraceOnNewLineForControlBlocks": false,
21+
"javascript.format.placeOpenBraceOnNewLineForFunctions": false,
22+
"typescript.format.insertSpaceBeforeFunctionParenthesis": false,
23+
"typescript.format.placeOpenBraceOnNewLineForControlBlocks": false,
24+
"typescript.format.placeOpenBraceOnNewLineForFunctions": false,
25+
"explorer.confirmDragAndDrop": true,
26+
"editor.inlineSuggest.enabled": true,
27+
"git.autofetch": true,
28+
"css.format.enable": false,
29+
"php.validate.enable": false,
30+
"editor.insertSpaces": false,
31+
"json.format.enable": true,
32+
"editor.unicodeHighlight.invisibleCharacters": false,
33+
"[json]": {
34+
"editor.defaultFormatter": "vscode.json-language-features"
35+
},
36+
"editor.fontSize": 16,
37+
"editor.wordWrap": "on",
38+
"editor.formatOnSave": true,
39+
"files.exclude": {
40+
"**/.trunk/*out": true,
41+
"**/.trunk/*out/": true,
42+
"**/.trunk/*actions/": true,
43+
"**/.trunk/*logs/": true,
44+
"**/.trunk/*plugins/": true
45+
},
46+
"files.watcherExclude": {
47+
"**/.trunk/*out": true,
48+
"**/.trunk/*out/": true,
49+
"**/.trunk/*actions/": true,
50+
"**/.trunk/*logs/": true,
51+
"**/.trunk/*plugins/": true
52+
},
53+
"errorLens.excludeBySource": [
54+
"dockerfile-utils(37)"
55+
],
56+
"[typescript]": {},
57+
"files.associations": {
58+
"*.ts": "typescript"
59+
},
60+
"window.zoomLevel": 1,
61+
"workbench.editor.empty.hint": "hidden"
62+
}

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<div align="center">
2+
<h1 align="center">ToDo GraphQL API using Redis</a>
3+
</div>
4+
5+
## Introduction
6+
7+
- A personal project I created to learn and improve my skills in:
8+
- [Elysia](https://elysiajs.com/)
9+
- [Redis](https://redis.io/)
10+
- [Apollo GraphQL](https://www.apollographql.com/)
11+
12+
- Techonologies:
13+
- [NodeJS v20](https://nodejs.org/en)
14+
- [TypeScript](https://www.typescriptlang.org/)
15+
- [Bun](https://bun.sh/)
16+
- [JWT](https://jwt.io/)
17+
18+
## Development Setup Local
19+
20+
1. Clone repository
21+
```
22+
git clone [email protected]:AlexGalhardo/todo-graphql-api-using-redis.git
23+
```
24+
25+
2. Install dependencies
26+
```
27+
bun install
28+
```
29+
30+
3. Create .env
31+
```
32+
cp .env.example .env
33+
```
34+
35+
4. Up Apollo GraphQL server
36+
```
37+
bun run server
38+
```
39+
40+
41+
## [Single-file executable](https://bun.sh/docs/bundler/executables)
42+
43+
- Building Server
44+
```
45+
bun build --compile --minify ./src/server.ts --outfile server
46+
```
47+
48+
- Executing binary
49+
```
50+
./server
51+
```
52+
53+
54+
## License
55+
56+
[MIT](http://opensource.org/licenses/MIT)
57+
58+
Copyright (c) April 2024-present, [Alex Galhardo](https://github.com/AlexGalhardo)

bun.lockb

122 KB
Binary file not shown.

0 commit comments

Comments
 (0)