Skip to content
Permalink
Browse files

Update file linkings

  • Loading branch information...
peter-stuhlmann committed Jul 10, 2019
1 parent 4125f7c commit 0eec4953eb6ae095e781d8c475aea0e54315613a
Showing with 19 additions and 9 deletions.
  1. 0 {v1 → }/helpers/logger.js
  2. 0 {v1 → }/helpers/messages.js
  3. +8 −6 index.js
  4. +0 −3 v1/converter/converter.js
  5. +11 −0 v1/v1.js
File renamed without changes.
File renamed without changes.
@@ -1,15 +1,17 @@
const express = require('express');
const app = express();
const port = 3112;
const routerConvert = require('./v1/converter/converter');
const logger = require('./v1/helpers/logger');

app.use(logger);
const routerV1 = require('./v1/v1');
const logger = require('./helpers/logger');
const errorHandler = require('./helpers/messages');

app.get('/', (req, res) => {
res.redirect('https://github.com/peter-stuhlmann/ColorConverter-API');
res.redirect('/v1');
});

app.use('/convert', routerConvert);
app.use('/v1', routerV1);

app.use(logger);
app.use(errorHandler);

app.listen(port, () => console.log(`ColorConverter is running on port ${port}!`));
@@ -1,9 +1,6 @@
const express = require('express');
const router = express.Router();
const convert = require('color-convert');
const errorHandler = require('../helpers/messages');

router.use(errorHandler);

router.get('/rgb-to-hsl', (req, res, next) => {
let rgbColor = req.query.color.split(',').map(colorValue => parseInt(colorValue));
@@ -0,0 +1,11 @@
const express = require('express');
const router = express.Router();
const routerConvert = require('./converter/converter');

router.get('/', (req, res) => {
res.redirect('https://github.com/peter-stuhlmann/ColorConverter-API');
});

router.use('/convert', routerConvert);

module.exports = router

0 comments on commit 0eec495

Please sign in to comment.
You can’t perform that action at this time.