https://github.com/probablyclem/esginodeapi
https://github.com/probablyclem/esginodeapi
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/probablyclem/esginodeapi
- Owner: ProbablyClem
- Created: 2022-07-19T14:19:08.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-21T13:27:03.000Z (almost 4 years ago)
- Last Synced: 2025-01-29T05:28:25.632Z (over 1 year ago)
- Language: JavaScript
- Size: 694 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# EsgiNodeApi
Clément Guiton B3 ESGI AL
## Consignes
- CRUD
- Authentication
- Connexion base de donnée
- Upload de fichier
- Validation
- Utilisation des modules ecmascript
## Setup
- Créer un fichier .env avec la variable DB_STRING qui contient l'url de la base de données
-
```console
$ npm install
$ node index.js
```
## Hierarchie
```
project
│ index.js //fichier principal
│
└───routes //Contiens les endpoits avec la validation
│ | ligneCompta.js ///logique metier
│ | auth.js //authentication
│
└───controllers //contient la logique et les interactions avec la bdd
│ | ligneCompta.js ///logique metier
│ | auth.js //authentication
|
|
└───models //contiens les objets metiers
│ | ligneCompta.js ///logique metier
│ | auth.js //authentication
|
|
└───factures //contiens les factures envoyées par le client
│
|
└───middleware //fonctions appelés avant les endpoits
│ is-auth.js //permet de verifier que l'utilisateur est identifié
```
## Documentation Swagger
Pour acceder au swagger:
- Lancer le server ($ node index.js)
- Acceder a l'url: http://localhost:3000/api-docs