1.0.0 • Published 2 years ago

paquete-token v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

instructions

--run npm i express pg sequelize sequelize-cli -- in case you don't have sequelize structure, run sequelize init --copy model,migrations,controllers and routes(you might want to copy only the code to you route files) to your folders -- you must have a migration en model named Client (Client for model and Clients for the migrations(table name)) NOTE: the migration must have a email as an attribute and must be not null --add the association in you client model in this way "Client.hasMany(models.Token)" --use the following routes to test the endpoints -- //token app.post('/api/v1/client-token/',tokenController.create) --email is required app.post('/api/v1/client-validate/',tokenController.validate) --tokenC is requires