Skip to content

Commit

Permalink
Merge pull request #11 from Nosesisaid/typescript+fastify
Browse files Browse the repository at this point in the history
Fumo-API v2
  • Loading branch information
v1ctorio committed May 14, 2022
2 parents 3cf2078 + f972949 commit 6210955
Show file tree
Hide file tree
Showing 24 changed files with 3,212 additions and 2,276 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MONGO_URL=
#PORT=8080
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/dist
*.
/tests
24 changes: 24 additions & 0 deletions .eslintrc.yml
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
71 changes: 0 additions & 71 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/tests.yml
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 }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
node_modules
.env
.env
dist
.nyc_output
.vscode
36 changes: 4 additions & 32 deletions README.md
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
Loading

0 comments on commit 6210955

Please sign in to comment.