Skip to content

Commit

Permalink
Migrate code to run in cloudflare workers with bun
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorAguero committed Apr 5, 2024
1 parent 9bc3cd6 commit 0867d00
Show file tree
Hide file tree
Showing 24 changed files with 613 additions and 2,792 deletions.
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,15 @@ build/

# Miscellaneous
.DS_Store
Thumbs.db
Thumbs.db

node_modules
.wrangler
.dev.vars

# Change them to your taste:
package-lock.json
yarn.lock
pnpm-lock.yaml
bun.lockb
wrangler.toml
7 changes: 0 additions & 7 deletions .vscode/settings.json

This file was deleted.

60 changes: 30 additions & 30 deletions assets/static/json/schools.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"id": 1,
"name": "Imperatriz Leopoldinense",
"imageUrl": "imperatriz_leopoldinense.jpg",
"imageUrl": "/schools/imperatriz_leopoldinense.jpg",
"foundationDate": "1959/3/6",
"godmotherSchool": "Império Serrano",
"colors": ["Verde", "Branco", "Ouro"],
Expand All @@ -18,7 +18,7 @@
{
"id": 2,
"name": "Unidos do Viradouro",
"imageUrl": "unidos_do_viradouro.jpg",
"imageUrl": "/schools/unidos_do_viradouro.jpg",
"foundationDate": "1946/6/24",
"godmotherSchool": "Portela",
"colors": ["Vermelho", "Branco"],
Expand All @@ -34,7 +34,7 @@
{
"id": 3,
"name": "Unidos de Vila Isabel",
"imageUrl": "unidos_de_vila_isabel.jpg",
"imageUrl": "/schools/unidos_de_vila_isabel.jpg",
"foundationDate": "1946/4/4",
"godmotherSchool": "Portela",
"colors": ["Branco", "Azul"],
Expand All @@ -50,7 +50,7 @@
{
"id": 4,
"name": "Beija-Flor de Nilópolis",
"imageUrl": "beija_flor_de_nipolis.jpg",
"imageUrl": "/schools/beija_flor_de_nipolis.jpg",
"foundationDate": "1948/12/25",
"godmotherSchool": "Portela",
"colors": ["Azul", "Branco"],
Expand All @@ -66,7 +66,7 @@
{
"id": 5,
"name": "Estação Primeira de Mangueira",
"imageUrl": "estacao_primera_de_mangueira.jpg",
"imageUrl": "/schools/estacao_primera_de_mangueira.jpg",
"foundationDate": "1928/4/28",
"godmotherSchool": "",
"colors": ["Verde", "Rosa"],
Expand All @@ -82,7 +82,7 @@
{
"id": 6,
"name": "Acadêmicos do Grande Rio",
"imageUrl": "academicos_do_grande_rio.jpg",
"imageUrl": "/schools/academicos_do_grande_rio.jpg",
"foundationDate": "1988/9/22",
"godmotherSchool": "Salgueiro",
"colors": ["Verde", "Branco", "Vermelho"],
Expand All @@ -98,7 +98,7 @@
{
"id": 7,
"name": "Acadêmicos do Salgueiro",
"imageUrl": "academicos_do_salgueiro.jpg",
"imageUrl": "/schools/academicos_do_salgueiro.jpg",
"foundationDate": "1953/3/5",
"godmotherSchool": "Mangueira",
"colors": ["Vermelho", "Branco"],
Expand All @@ -120,7 +120,7 @@
{
"id": 8,
"name": "Paraíso do Tuiuti",
"imageUrl": "paraiso_do_tuiuti.jpg",
"imageUrl": "/schools/paraiso_do_tuiuti.jpg",
"foundationDate": "1952/4/5",
"godmotherSchool": "Mangueira",
"colors": ["Azul", "Amarelo"],
Expand All @@ -136,7 +136,7 @@
{
"id": 9,
"name": "Unidos da Tijuca",
"imageUrl": "unidos_da_tijuca.jpg",
"imageUrl": "/schools/unidos_da_tijuca.jpg",
"foundationDate": "1931/12/31",
"godmotherSchool": "",
"colors": ["Azul", "Amarelo"],
Expand All @@ -152,7 +152,7 @@
{
"id": 10,
"name": "Portela",
"imageUrl": "portela.jpg",
"imageUrl": "/schools/portela.jpg",
"foundationDate": "1923/4/11",
"godmotherSchool": "",
"colors": ["Azul", "Branco"],
Expand All @@ -168,7 +168,7 @@
{
"id": 11,
"name": "Mocidade Independente de Padre Miguel",
"imageUrl": "mocidade_independente_de_padre_miguel.jpg",
"imageUrl": "/schools/mocidade_independente_de_padre_miguel.jpg",
"foundationDate": "1955/11/10",
"godmotherSchool": "Império Serrano",
"colors": ["Verde", "Branco"],
Expand All @@ -184,7 +184,7 @@
{
"id": 12,
"name": "Império Serrano",
"imageUrl": "imperio_serrano.jpg",
"imageUrl": "/schools/imperio_serrano.jpg",
"foundationDate": "1947/3/23",
"godmotherSchool": "",
"colors": ["Verde", "Branco"],
Expand All @@ -200,7 +200,7 @@
{
"id": 13,
"name": "Unidos do Porto da Pedra",
"imageUrl": "unidos_do_porto_da_pedra.jpg",
"imageUrl": "/schools/unidos_do_porto_da_pedra.jpg",
"foundationDate": "1978/3/8",
"godmotherSchool": "União da Ilha",
"colors": ["Vermelho", "Branco"],
Expand All @@ -216,7 +216,7 @@
{
"id": 14,
"name": "Unidos de Padre Miguel",
"imageUrl": "unidos_de_padre_miguel.jpg",
"imageUrl": "/schools/unidos_de_padre_miguel.jpg",
"foundationDate": "1957/11/12",
"godmotherSchool": "",
"colors": ["Vermelho", "Branco"],
Expand All @@ -232,7 +232,7 @@
{
"id": 15,
"name": "Inocentes de Belford Roxo",
"imageUrl": "inocentes_de_belford_roxo.jpg",
"imageUrl": "/schools/inocentes_de_belford_roxo.jpg",
"foundationDate": "1993/7/11",
"godmotherSchool": "Império Serrano",
"colors": ["Vermelho", "Azul", "Branco"],
Expand All @@ -248,7 +248,7 @@
{
"id": 16,
"name": "Império da Tijuca",
"imageUrl": "imperio_da_tijuca.jpg",
"imageUrl": "/schools/imperio_da_tijuca.jpg",
"foundationDate": "1940/12/8",
"godmotherSchool": "",
"colors": ["Verde", "Branco"],
Expand All @@ -264,7 +264,7 @@
{
"id": 17,
"name": "Acadêmicos de Niterói",
"imageUrl": "academicos_de_niteroi.jpg",
"imageUrl": "/schools/academicos_de_niteroi.jpg",
"foundationDate": "2018/3/26",
"godmotherSchool": "",
"colors": ["Azul", "Branco"],
Expand All @@ -280,7 +280,7 @@
{
"id": 18,
"name": "União da Ilha do Governador",
"imageUrl": "uniao_da_ilha_do_governador.jpg",
"imageUrl": "/schools/uniao_da_ilha_do_governador.jpg",
"foundationDate": "1953/3/7",
"godmotherSchool": "Portela",
"colors": ["Azul", "Branco", "Vermelho"],
Expand All @@ -296,7 +296,7 @@
{
"id": 19,
"name": "São Clemente",
"imageUrl": "sao_clemente.jpg",
"imageUrl": "/schools/sao_clemente.jpg",
"foundationDate": "1961/10/25",
"godmotherSchool": "Unidos de Vila Isabel",
"colors": ["Preto", "Amarelo"],
Expand All @@ -312,7 +312,7 @@
{
"id": 20,
"name": "Estácio de Sá",
"imageUrl": "estacio_de_sa.jpg",
"imageUrl": "/schools/estacio_de_sa.jpg",
"foundationDate": "1955/2/27",
"godmotherSchool": "",
"colors": ["Vermelho", "Branco"],
Expand All @@ -328,7 +328,7 @@
{
"id": 21,
"name": "Unidos de Bangu",
"imageUrl": "unidos_de_bangu.jpg",
"imageUrl": "/schools/unidos_de_bangu.jpg",
"foundationDate": "1937/11/15",
"godmotherSchool": "",
"colors": ["Vermelho", "Branco"],
Expand All @@ -344,7 +344,7 @@
{
"id": 22,
"name": "Acadêmicos de Vigário Geral",
"imageUrl": "academicos_de_vigario_geral.jpg",
"imageUrl": "/schools/academicos_de_vigario_geral.jpg",
"foundationDate": "1991/3/13",
"godmotherSchool": "União da Ilha",
"colors": ["Azul", "Vermelho", "Branco"],
Expand All @@ -360,7 +360,7 @@
{
"id": 23,
"name": "Unidos da Ponte",
"imageUrl": "unidos_da_ponte.jpg",
"imageUrl": "/schools/unidos_da_ponte.jpg",
"foundationDate": "1952/11/3",
"godmotherSchool": "",
"colors": ["Azul Marinho", "Índigo", "Branco"],
Expand All @@ -376,7 +376,7 @@
{
"id": 24,
"name": "Arranco do Engenho de Dentro",
"imageUrl": "arranco.jpg",
"imageUrl": "/schools/arranco.jpg",
"foundationDate": "1973/3/21",
"godmotherSchool": "Portela",
"colors": ["Azul", "Branco"],
Expand All @@ -392,7 +392,7 @@
{
"id": 25,
"name": "Em Cima da Hora",
"imageUrl": "em_cima_da_hora.jpg",
"imageUrl": "/schools/em_cima_da_hora.jpg",
"foundationDate": "1959/11/15",
"godmotherSchool": "Portela",
"colors": ["Azul-Pavão", "Branco"],
Expand All @@ -408,7 +408,7 @@
{
"id": 26,
"name": "União de Maricá",
"imageUrl": "uniao_de_marica.jpg",
"imageUrl": "/schools/uniao_de_marica.jpg",
"foundationDate": "2023/11/23",
"godmotherSchool": "Unidos do Porto da Pedra",
"colors": ["Vermelho", "Ouro", "Branco"],
Expand All @@ -424,7 +424,7 @@
{
"id": 27,
"name": "União do Parque Acarí",
"imageUrl": "uniao_do_parque_acari.jpg",
"imageUrl": "/schools/uniao_do_parque_acari.jpg",
"foundationDate": "2018/1/1",
"godmotherSchool": "",
"colors": ["Amarelo", "Branco", "Rosa"],
Expand All @@ -440,7 +440,7 @@
{
"id": 28,
"name": "Lins Imperial",
"imageUrl": "lins_imperial.jpg",
"imageUrl": "/schools/lins_imperial.jpg",
"foundationDate": "1963/3/7",
"godmotherSchool": "Mangueira, Portela e Salgueiro",
"colors": ["Verde", "Rosa"],
Expand All @@ -456,7 +456,7 @@
{
"id": 29,
"name": "União de Jacarepaguá",
"imageUrl": "uniao_de_jacarepagua.jpg",
"imageUrl": "/schools/uniao_de_jacarepagua.jpg",
"foundationDate": "1956/11/15",
"godmotherSchool": "",
"colors": ["Verde", "Branco"],
Expand All @@ -472,7 +472,7 @@
{
"id": 30,
"name": "Sereno de Campo Grande",
"imageUrl": "sereno.jpg",
"imageUrl": "/schools/sereno.jpg",
"foundationDate": "1996/02/12",
"godmotherSchool": "",
"colors": ["Azul", "Branco"],
Expand Down
12 changes: 12 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.4/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
2 changes: 2 additions & 0 deletions bunfig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[install.scopes]
"@jsr" = "https://npm.jsr.io"
16 changes: 0 additions & 16 deletions deno.jsonc

This file was deleted.

Loading

1 comment on commit 0867d00

@deno-deploy
Copy link

@deno-deploy deno-deploy bot commented on 0867d00 Apr 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed to deploy:

Relative import path "hono/secure-headers" not prefixed with / or ./ or ../

Please sign in to comment.