-
Notifications
You must be signed in to change notification settings - Fork 2
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 #11 from Nosesisaid/typescript+fastify
Fumo-API v2
- Loading branch information
Showing
24 changed files
with
3,212 additions
and
2,276 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,2 @@ | ||
MONGO_URL= | ||
#PORT=8080 |
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,3 @@ | ||
/dist | ||
*. | ||
/tests |
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,24 @@ | ||
env: | ||
browser: true | ||
es2021: true | ||
extends: | ||
- eslint:recommended | ||
- plugin:@typescript-eslint/recommended | ||
parser: '@typescript-eslint/parser' | ||
parserOptions: | ||
ecmaVersion: latest | ||
sourceType: module | ||
plugins: | ||
- '@typescript-eslint' | ||
rules: | ||
indent: | ||
- error | ||
- tab | ||
linebreak-style: off | ||
quotes: | ||
- error | ||
- single | ||
semi: | ||
- error | ||
- always | ||
"@typescript-eslint/no-explicit-any": off |
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,54 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- typescript+fastify | ||
pull_request: | ||
branches: [ main ] | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
avoid_redundancy: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Cancel Previous Redundant Builds | ||
uses: styfle/cancel-workflow-action@0.9.1 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
lint: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
cache: 'yarn' | ||
node-version: '16' | ||
- name: Install dependencies | ||
run: yarn | ||
- name: Lint | ||
run: yarn run lint | ||
|
||
test: | ||
needs: [ lint ] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- run: yarn | ||
- run: yarn run build | ||
- run: yarn test | ||
env: | ||
MONGO_URL: ${{ secrets.MONGOURL }} |
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,2 +1,5 @@ | ||
node_modules | ||
.env | ||
.env | ||
dist | ||
.nyc_output | ||
.vscode |
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,35 +1,7 @@ | ||
# fumo rest API | ||
# fumo API | ||
|
||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a7dd96acbca0480788311a77d47b3208)](https://app.codacy.com/gh/Nosesisaid/fumo-API?utm_source=github.com&utm_medium=referral&utm_content=Nosesisaid/fumo-API&utm_campaign=Badge_Grade_Settings) | ||
Rest API of images of fumos (japanese plushies) using typescript and fastify. | ||
|
||
## Issues | ||
If you find a repeated fumo please create an issue | ||
## Objects | ||
|
||
### Fumo | ||
|
||
```json | ||
{ | ||
"_id": "fumo id", | ||
"URL": "fumo image url", | ||
"__v": 0 | ||
} | ||
``` | ||
|
||
## Paths | ||
|
||
### <code>/random</code> | ||
|
||
Return a random fumo object. | ||
|
||
### <code> /fumos</code> | ||
|
||
Fumo list. | ||
|
||
#### <code>/</code> | ||
|
||
Return the full fumo list. | ||
|
||
#### <code>/id</code> | ||
|
||
Return the fumo object with the provided ID. | ||
## Issues | ||
If you find a repeated fumo please create an issue |
Oops, something went wrong.