stub auth routes and controllers
This commit is contained in:
parent
cd1273e645
commit
a629225fae
4 changed files with 34 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
|
||||
|
||||
const signUp = (req, res, next) => {
|
||||
|
||||
}
|
||||
|
||||
const login = (req, res, next) => {
|
||||
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
signUp,
|
||||
login
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
const express = require('express');
|
||||
const router = express.Router();
|
||||
|
||||
// router.get('/', );
|
||||
|
||||
module.exports = router;
|
|
@ -0,0 +1,9 @@
|
|||
const express = require('express');
|
||||
const router = express.Router();
|
||||
|
||||
const authController = require('../controllers/auth');
|
||||
|
||||
router.post('/signup', authController.signUp);
|
||||
router.post('/login', authController.login);
|
||||
|
||||
module.exports = router;
|
|
@ -14,6 +14,8 @@ dotenv.config();
|
|||
|
||||
const indexRouter = require('./routes/index');
|
||||
const usersRouter = require('./routes/users');
|
||||
const authRouter = require('./routes/auth');
|
||||
const apiRouter = require('./routes/api');
|
||||
|
||||
const app = express();
|
||||
|
||||
|
@ -34,6 +36,9 @@ app.use(express.static(path.join(__dirname, 'public')));
|
|||
|
||||
app.use('/', indexRouter);
|
||||
app.use('/users', usersRouter);
|
||||
app.use('/auth', authRouter);
|
||||
// @auth
|
||||
app.use('/api', apiRouter);
|
||||
|
||||
// catch 404 and forward to error handler
|
||||
app.use(function(req, res, next) {
|
||||
|
|
Loading…
Reference in a new issue