Skip to content

Commit aaac3e4

Browse files
authored
[FEATURE] - Add 2nd sprint work (#47)
* Initializing node project (#1) * initializing node project * travis.yml * changing the test script * Issue.#3.mongo setup (#14) * initializing node project * config basic mongoose and very simple user schema * models file * fixing error * Update issue templates (#2) * update the babel version (#15) * Add - WIP: Node structure * Add - node controller * Add - First test using mockingoose * Fix - minor changes * Fix - typo * User model (#24) * new pr * fix import error * adding simple user test * Add - missing middleware for json handling * Add - api test, Fix - how to use a request controller * refactor * adding a test case * fix testcase * adding more tests * add mongoose relationship * machine schema * fix relationship * factory schema * add updated at and created at as a auto generated by mongoose * change name and game schema * refactor * add cors * add auth service, add login functionality * Machine schema (#25) * add mongoose relationship * machine schema * fix relationship * Factory schema (#26) * factory schema * add updated at and created at as a auto generated by mongoose * Game Schema (#27) * change name and game schema * refactor * using Schema id type instead of String * Add - Game ctrl and routing * add game routing, add create and get game * fix Schema inconsistency * add create, get, delete games * add update game * add populate games in login * add prometheus client, add response time * add env var to initialize monitoring * add game in create game post route * add artillery, add examples ouputs, add scripts for running this ones (#44) * Add - tests for /user/:userId/games and /user/:userId/games/:gameId (#45) * Add - tests for /user/:userId/games and /user/:userId/games/:gameId * Fix - missing grid generator file
1 parent f61dd1d commit aaac3e4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+98420
-0
lines changed

.babelrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"presets": [[
3+
"@babel/preset-env", {
4+
"useBuiltIns": "entry"
5+
}]
6+
],
7+
"plugins": [
8+
"@babel/plugin-proposal-object-rest-spread",
9+
["@babel/plugin-transform-runtime",
10+
{
11+
"regenerator": true
12+
}
13+
]
14+
]
15+
}

.eslintrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"parser": "babel-eslint",
3+
"plugins": ["babel", "node", "jest"],
4+
"extends": [
5+
"eslint:recommended",
6+
"plugin:node/recommended",
7+
"plugin:jest/recommended"
8+
],
9+
"rules": {
10+
"no-console": "warn",
11+
"comma-dangle": [2, "never"],
12+
"semi": 0,
13+
"max-len": 0,
14+
"no-multiple-empty-lines": 0,
15+
"object-shorthand": 0,
16+
"padded-blocks": 0
17+
}
18+
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
language: node_js
2+
node_js:
3+
- '10'
4+
cache:
5+
directories:
6+
- 'node_modules'
7+
script:
8+
- yarn test
9+

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
# pdes-tp-backend-team_prog
2+
3+
4+
# To Run
5+
6+
```
7+
> yarn start
8+
```
9+

index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import express from 'express'
2+
import morgan from 'morgan'
3+
4+
const app = express()
5+
6+
app.use(morgan('dev'))
7+
8+
app.get('/', (req, res) => {
9+
res.status(200).json({ status: 'ok', greeting: 'hello' })
10+
})
11+
12+
export default app

jest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
testEnvironment: 'node'
3+
};

0 commit comments

Comments
 (0)