Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khriztianmoreno/medjs-workshop-fullstack-js-backend
Código base para el taller Fullstack en la parte de backend usando Express.js, MongodDB
https://github.com/khriztianmoreno/medjs-workshop-fullstack-js-backend
community expressjs javascript mongodb mongoose nodejs passportjs workshop workshop-materials
Last synced: 22 days ago
JSON representation
Código base para el taller Fullstack en la parte de backend usando Express.js, MongodDB
- Host: GitHub
- URL: https://github.com/khriztianmoreno/medjs-workshop-fullstack-js-backend
- Owner: khriztianmoreno
- License: mit
- Created: 2019-06-15T03:39:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T11:24:53.000Z (about 2 years ago)
- Last Synced: 2024-04-15T00:05:16.258Z (9 months ago)
- Topics: community, expressjs, javascript, mongodb, mongoose, nodejs, passportjs, workshop, workshop-materials
- Language: JavaScript
- Homepage: https://medellin-js.gitbook.io/workshop-fullstack-js-developer/
- Size: 823 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Workshop FullStack Javascript Developer: Backend
Este repositorio contiene el código fuente del taller de MedellinJS sobre cómo crear un carrito de compras con NodeJS / Express / MongoDB
## Instalar y ejecutar
```bash
# Install
$ npm install# Run
npm run dev
```## Uso
El proyecto expone tres endpoint basicos:
- `/api/helloworld` Para testear que nuestro proyecto esta funcionando
- `/api/users`
- `/api/products`### Ejemplo basico **Crear USUARIO** `/api/users`:
Request Body:
```json
{
"name": "CRISTIAN MORENO",
"email": "[email protected]",
"password": "my-secret-password",
"role": "user"
}
```Response:
```json
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1OWFiNzkyMWQ1Yzk3NjJlZGQzZmUwZDgiLCJpYXQiOjE1MDQ0MDk4ODksImV4cCI6MTUwNDQyNzg4OX0.2gZPXZ-dQc3kQ1fcIDryHm4gIqWLvcw6guAOnP0ueGU"
}
```## Estructura del proyecto
```
backend-js-shopping
├── api
│ ├── helloWorld
│ │ ├── helloWorld.controller.js
│ │ └── index.js
│ ├── product
│ │ ├── product.controller.js
│ │ ├── product.model.js
│ │ └── index.js
│ └── user
│ ├── user.controller.js
│ ├── user.model.js
│ └── index.js
├── auth
│ ├── local
│ │ ├── passport.js
│ │ └── index.js
│ ├── auth.service.js
│ └── index.js
├── config
│ ├── environment
│ │ ├── development.js
│ │ ├── production.js
│ │ ├── shared.js
│ │ └── index.js
│ ├── express.js
│ └── local.env.js
├── app.js
├── routes.js
└── index.js
```