-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from sjdonado/refactor/v2-elysia-htmx-jsx
refactor: API v1.3 elysia htmx jsx
- Loading branch information
Showing
108 changed files
with
32,339 additions
and
5,781 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,20 @@ | ||
{ | ||
"env": { | ||
"browser": true | ||
"browser": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"airbnb-base", | ||
"airbnb-typescript/base", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:@typescript-eslint/strict", | ||
"plugin:solid/typescript" | ||
"plugin:prettier/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"overrides": [], | ||
"parserOptions": { | ||
"project": [ | ||
"./tsconfig.json" | ||
] | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"solid" | ||
"jsx" | ||
], | ||
"rules": { | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
"": "never" | ||
} | ||
], | ||
"@typescript-eslint/no-misused-promises": [ | ||
"error", | ||
{ | ||
"checksVoidReturn": false | ||
} | ||
], | ||
"import/prefer-default-export": "off" | ||
} | ||
"rules": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
name: "deploy to sjdonado.de" | ||
name: 'deploy to sjdonado.de' | ||
|
||
on: | ||
push: | ||
|
@@ -16,5 +16,5 @@ jobs: | |
- name: Push to dokku | ||
uses: dokku/github-action@master | ||
with: | ||
git_remote_url: "ssh://[email protected]:22/idonthavespotify" | ||
git_remote_url: 'ssh://[email protected]:22/idonthavespotify' | ||
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,8 @@ | ||
|
||
dist | ||
.solid | ||
.output | ||
.vercel | ||
.netlify | ||
netlify | ||
|
||
# dependencies | ||
/node_modules | ||
*.min.js | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
*.launch | ||
.settings/ | ||
|
||
# Temp | ||
gitignore | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
.env | ||
/test-results/ | ||
/playwright-report/ | ||
/playwright/.cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"printWidth": 90, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": false, | ||
"arrowParens": "avoid", | ||
"htmlWhitespaceSensitivity": "css" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
FROM node:19-alpine | ||
FROM oven/bun | ||
|
||
EXPOSE 5000 | ||
EXPOSE 3000 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY package.json ./ | ||
COPY yarn.lock ./ | ||
ENV NODE_ENV production | ||
|
||
RUN yarn install | ||
COPY package.json . | ||
COPY bun.lockb . | ||
|
||
COPY . . | ||
RUN bun install | ||
|
||
RUN yarn build | ||
COPY src src | ||
COPY www www | ||
|
||
CMD ["node", "./dist/server.js"] | ||
COPY tsconfig.json . | ||
COPY build.ts . | ||
COPY tailwind.config.js . | ||
|
||
RUN bun run build:js | ||
RUN bun run build:css | ||
|
||
COPY public public | ||
|
||
CMD ["bun", "www/bin.ts"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,15 @@ | ||
# I don't have Spotify | ||
> More links coming soon :) | ||
# Elysia with Bun runtime | ||
|
||
| Raycast API | Web Page | | ||
| -------------| --------- | | ||
| ![Uptime Badge](https://uptime.sjdonado.de/api/badge/3/uptime/24?labelPrefix=API%20&labelSuffix=h) ![Uptime Badge](https://uptime.sjdonado.de/api/badge/3/ping/24?labelPrefix=API%20) | ![Uptime Badge](https://uptime.sjdonado.de/api/badge/2/uptime/24?labelPrefix=Web%20Page%20&labelSuffix=h) ![Uptime Badge](https://uptime.sjdonado.de/api/badge/2/ping/24?labelPrefix=Web%20Page%20) | | ||
## Getting Started | ||
To get started with this template, simply paste this command into your terminal: | ||
```bash | ||
bun create elysia ./elysia-example | ||
``` | ||
|
||
## Web | ||
<div align="center"> | ||
<img alt="Website screenshot" src="https://user-images.githubusercontent.com/27580836/232951519-e536c69d-0207-4c40-806c-5772f62f1377.png"> | ||
</div> | ||
## Development | ||
To start the development server run: | ||
```bash | ||
bun run dev | ||
``` | ||
|
||
## Raycast Extension | ||
<a href="https://raycast.com/sjdonado/idonthavespotify" target="_blank"> | ||
<div align="center"> | ||
<img alt="Raycast Extension screenshot" src="https://user-images.githubusercontent.com/27580836/230833330-9759063b-04d4-4559-b3b2-859e4a13f947.png"> | ||
</div> | ||
</a> | ||
|
||
## More info | ||
<img width=50 src="https://user-images.githubusercontent.com/27580836/227801051-a71d389e-2510-4965-a23e-d7478fe28f13.jpeg"/> | ||
Icon Generated by https://deepai.org/machine-learning-model/text2img | ||
Open http://localhost:3000/ with your browser to see the result. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const output = await Bun.build({ | ||
entrypoints: ['./src/views/js/audio-preview.js', './src/views/js/search-bar.js'], | ||
outdir: './public/assets/js', | ||
naming: '[dir]/[name].min.[ext]', | ||
target: 'browser', | ||
minify: true, | ||
}); | ||
|
||
console.log(output.outputs); | ||
|
||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
version: '3' | ||
services: | ||
app: | ||
image: idonthavespotify | ||
env_file: .env | ||
ports: | ||
- 3000:3000 | ||
redis: | ||
image: redis:7.0-alpine | ||
ports: | ||
- 6379:6379 | ||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.test | ||
volumes: | ||
- .:/usr/src/app | ||
- /usr/src/app/node_modules | ||
env_file: | ||
- .env | ||
environment: | ||
REDIS_URL: redis://redis:6379 | ||
command: yarn e2e | ||
ports: | ||
- 3000:3000 | ||
- 9323:9323 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,37 @@ | ||
{ | ||
"name": "idonthavespotify", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=16" | ||
}, | ||
"version": "1.0.50", | ||
"scripts": { | ||
"dev": "solid-start dev", | ||
"build": "solid-start build", | ||
"start": "solid-start start", | ||
"e2e": "playwright test" | ||
"dev": "bun run build:js && bun run build:css && bun run --watch www/bin.ts", | ||
"test": "REDIS_URL=redis://null:6379 bun test --coverage", | ||
"build:js": "bun run build.ts", | ||
"build:css": "tailwindcss -i ./src/views/css/index.css -o ./public/assets/css/index.css" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"@solidjs/meta": "^0.28.2", | ||
"@solidjs/router": "^0.8.2", | ||
"@types/string-similarity": "^4.0.0", | ||
"@elysiajs/html": "^0.7.3", | ||
"@elysiajs/static": "^0.7.1", | ||
"axios": "^1.5.1", | ||
"cheerio": "^1.0.0-rc.12", | ||
"ioredis": "^5.3.1", | ||
"solid-js": "^1.6.11", | ||
"solid-start": "^0.2.26", | ||
"string-similarity": "^4.0.4", | ||
"undici": "^5.15.1" | ||
"elysia": "latest", | ||
"ioredis": "^5.3.2", | ||
"pino": "^8.16.0", | ||
"pino-pretty": "^10.2.3", | ||
"string-similarity": "^4.0.4" | ||
}, | ||
"devDependencies": { | ||
"@playwright/test": "^1.32.1", | ||
"@types/cheerio": "^0.22.31", | ||
"@typescript-eslint/eslint-plugin": "^5.56.0", | ||
"@typescript-eslint/parser": "^5.56.0", | ||
"autoprefixer": "^10.4.13", | ||
"eslint": "^8.36.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-airbnb-typescript": "^17.0.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-solid": "^0.11.0", | ||
"postcss": "^8.4.21", | ||
"solid-start-node": "^0.2.19", | ||
"tailwindcss": "^3.2.4", | ||
"typescript": "^4.9.4", | ||
"vite": "^4.2.1" | ||
} | ||
"@types/string-similarity": "^4.0.0", | ||
"@typescript-eslint/eslint-plugin": "^6.7.4", | ||
"axios-mock-adapter": "^1.22.0", | ||
"bun-types": "latest", | ||
"eslint": "^8.50.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"eslint-plugin-jsx": "^0.1.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"ioredis-mock": "^8.9.0", | ||
"prettier": "^3.0.3", | ||
"tailwindcss": "^3.3.3", | ||
"typescript": "^5.2.2" | ||
}, | ||
"module": "www/bin.js" | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.