generated from well-known-components/template-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove template stuff and db connection (#5)
* remove template stuff * db connection * frienships migration * change template workflows * new workflows * bump uws component * fix build * better name * seed test * license * eslint * linter
- Loading branch information
Showing
29 changed files
with
1,719 additions
and
547 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
test/ | ||
dist/ | ||
*.js | ||
*.d.ts | ||
*.json | ||
src/index.ts | ||
|
||
src/proto |
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,18 @@ | ||
{ | ||
"extends": "@dcl/eslint-config/sdk", | ||
"parserOptions": { | ||
"project": ["tsconfig.json"] | ||
}, | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"printWidth": 120, | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"tabWidth": 2 | ||
} | ||
] | ||
} | ||
} |
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,7 +1,18 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: npm | ||
directory: '/' | ||
schedule: | ||
interval: weekly | ||
day: monday | ||
time: '10:00' | ||
timezone: 'America/Buenos_Aires' | ||
allow: | ||
- dependency-name: '@dcl/*' | ||
- dependency-name: '@catalyst/*' | ||
- dependency-name: '@well-known-components/*' | ||
- dependency-name: 'dcl-*' | ||
- dependency-name: 'eth-connect' | ||
versioning-strategy: auto | ||
commit-message: | ||
prefix: 'chore: ' |
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,8 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
build: | ||
uses: decentraland/platform-actions/.github/workflows/apps-with-db-build.yml@main |
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,15 @@ | ||
name: CI/CD on main branch | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
social-service-ea-deployment: | ||
uses: decentraland/platform-actions/.github/workflows/apps-docker-next.yml@main | ||
with: | ||
service-name: social-service-ea | ||
image-name: social-service-ea | ||
deployment-environment: dev | ||
secrets: inherit |
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,15 @@ | ||
name: Publish 'latest' image | ||
|
||
on: | ||
release: | ||
types: | ||
- 'created' | ||
|
||
jobs: | ||
social-service-ea-deployment: | ||
uses: decentraland/platform-actions/.github/workflows/apps-docker-release.yml@main | ||
with: | ||
service-name: social-service-ea | ||
image-name: social-service-ea | ||
deployment-environment: prd | ||
secrets: inherit |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
deployment-environment: | ||
required: true | ||
type: choice | ||
options: | ||
- dev | ||
- prd | ||
default: prd | ||
description: Environment | ||
tag: | ||
required: true | ||
default: 'latest' | ||
type: string | ||
description: 'Docker tag (quay.io)' | ||
|
||
jobs: | ||
deployment: | ||
if: ${{ inputs.deployment-environment }} | ||
name: 'Deploy to: ${{ inputs.deployment-environment }}' | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.deployment-environment }} | ||
steps: | ||
- name: Trigger Quests Server deployment | ||
id: deploy-server | ||
uses: decentraland/dcl-deploy-action@main | ||
with: | ||
dockerImage: 'quay.io/decentraland/social-service-ea:${{ inputs.tag }}' | ||
serviceName: 'social-service-ea' | ||
env: ${{ inputs.deployment-environment }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: CI/CD on PR | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
pr: | ||
uses: decentraland/platform-actions/.github/workflows/apps-pr.yml@main | ||
with: | ||
service-name: social-service-ea | ||
secrets: inherit |
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,9 @@ | ||
name: validate-pr-title | ||
|
||
on: | ||
pull_request: | ||
types: [edited, opened, reopened, synchronize] | ||
|
||
jobs: | ||
title-matches-convention: | ||
uses: decentraland/actions/.github/workflows/validate-pr-title.yml@main |
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,4 +1,5 @@ | ||
dist/ | ||
node_modules/ | ||
**/.DS_Store | ||
coverage | ||
coverage | ||
.env |
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 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { AppComponents } from '../types' | ||
|
||
export interface IDatabaseComponent {} | ||
|
||
export function createDBComponent(_components: Pick<AppComponents, 'pg' | 'logs'>): IDatabaseComponent { | ||
return {} | ||
} |
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 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,12 +1,9 @@ | ||
import { Router } from "@well-known-components/http-server" | ||
import { GlobalContext } from "../types" | ||
import { pingHandler } from "./handlers/ping-handler" | ||
import { Router } from '@well-known-components/http-server' | ||
import { GlobalContext } from '../types' | ||
|
||
// We return the entire router because it will be easier to test than a whole server | ||
export async function setupRouter(globalContext: GlobalContext): Promise<Router<GlobalContext>> { | ||
const router = new Router<GlobalContext>() | ||
|
||
router.get("/ping", pingHandler) | ||
|
||
return router | ||
} |
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
Oops, something went wrong.