Skip to content

Commit

Permalink
refactor: use kebab-case file names
Browse files Browse the repository at this point in the history
  • Loading branch information
raisedadead committed Jun 16, 2024
1 parent 9c1f986 commit 848b5ec
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/routes/routes.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import express from 'express';
import { fetchContent } from '../fetch-content.js';
import { logger } from '../config/loggerConfig.js';
import { logger } from '../config/logger.js';

const router = express.Router();

router.get("/", async (req, res) => {
router.get('/', async (req, res) => {
const { slugId } = req.query;
if (slugId) {
return res.redirect(`/${slugId}`);
Expand Down
16 changes: 8 additions & 8 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import nunjucks from 'nunjucks';
import morgan from 'morgan';
import 'dotenv/config';

import { logger, morganStream } from './config/loggerConfig.js';
import helmetConfig from './config/helmetConfig.js';
import rateLimitConfig from './config/rateLimitConfig.js';
import { logger, morganStream } from './config/logger.js';
import helmetConfig from './config/helmet.js';
import rateLimitConfig from './config/rate-limit.js';

import cacheControl from './middlewares/cacheControl.js';
import frameOptions from './middlewares/frameOptions.js';
import jsonLimit from './middlewares/jsonLimit.js';
import cacheControl from './middlewares/cache-control.js';
import frameOptions from './middlewares/frame-options.js';
import jsonLimit from './middlewares/json-limit.js';

import mainRoute from './routes/routes.js';
import router from './routes/routes.js';

const app = express();

Expand All @@ -34,7 +34,7 @@ app.use(jsonLimit);
app.use(cacheControl);

// Route setup
app.use(mainRoute);
app.use(router);

// Handle all other routes
app.all('*', (_req, res) => {
Expand Down

0 comments on commit 848b5ec

Please sign in to comment.