Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dancespiele/sport-api
https://github.com/dancespiele/sport-api
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dancespiele/sport-api
- Owner: dancespiele
- License: mit
- Created: 2018-04-06T18:17:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-04-09T09:11:09.000Z (over 6 years ago)
- Last Synced: 2024-10-10T05:35:23.412Z (28 days ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sport API
This is a backend example using [express](https://expressjs.com/)## Requirements
* MongoDB
* Node## Download
`git clone [email protected]:dancespiele/sport-api.git`
Enter to the folder and execute:
```
`yarn` or `yarn install`
```## Settings
Create database in mongo with the name ***sport***, create an user asigned to it and import the file `collection/users.json`.
`mongoimport --db sport --collection users --file collection/users.json`
Create a script file ***run.sh*** in root path of the project:
```
export SECRET=your secret
export EXP=1
export SERVICE_PORT=8000
export MONGO_USER=your user
export MONGO_PASSWORD= your mongo password
export MONGO_HOST=localhost
export MONGO_DATABASE=sportnode_modules/.bin/nodemon --watch 'app/**/**' ./app/index.js
```## RUN
`yarn run watch`
## RUN INTEGRATIONS TEST
With the project running:
`yarn test`
## API Docs
With the project running go to the browser to the link `http://localhost:8000/api-docs/`