2018-11-02 23:37:08 +00:00
|
|
|
require('@google-cloud/debug-agent').start();
|
|
|
|
|
2018-11-02 16:39:33 +00:00
|
|
|
const expressr = require('express');
|
|
|
|
const apuri = expressr();
|
|
|
|
const session = require('express-session');
|
|
|
|
|
|
|
|
apuri.use(expressr.json());
|
|
|
|
apuri.use(expressr.urlencoded());
|
|
|
|
apuri.use(expressr.static('dist'));
|
|
|
|
apuri.use(session({
|
|
|
|
secret: 'azopotamadre we v:',
|
|
|
|
resave: false,
|
|
|
|
saveUninitialized: false
|
|
|
|
}));
|
|
|
|
|
|
|
|
/* PUERTO NECESARIO PARA DEPLOYAR EN GOOGLE CLOUD!!! */
|
|
|
|
const puerto = 8080;
|
|
|
|
|
|
|
|
apuri.post('/log-inG', require('./Backend/revisarUsuarioG.js').revisarUsuarioG);
|
|
|
|
apuri.post('/usuarios', require('./Backend/usuarios.js').usuarios);
|
|
|
|
apuri.post('/registro', require('./Backend/registrarUsuario.js').registrar);
|
|
|
|
apuri.post('/sesion', require('./Backend/usuarioLogueado').revisarSesion);
|
2018-11-02 23:37:08 +00:00
|
|
|
apuri.post('/pedidos/actual', require('./Backend/Pedidos/obtenerPedidosActuales').obtenerPedido);
|
2018-11-02 16:39:33 +00:00
|
|
|
|
|
|
|
apuri.get('/');
|
|
|
|
|
|
|
|
|
|
|
|
apuri.listen(puerto, () => console.log(`Estoy escuchando el puerto ${puerto} we v:`));
|