Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import chalk from 'chalk';
import ora from 'ora'; // Import the ora package
import inquirer from 'inquirer'; // Import the inquirer package
import { exec } from 'child_process'

import { dependencies } from './snippetdependencies.js';


Expand Down
1 change: 0 additions & 1 deletion templates/src/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// src/app.js

const express = require("express");
const constants = require("./constants");

Expand Down
4 changes: 2 additions & 2 deletions templates/src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// src/index.js

const notfound=require('./middlewares/notfound')
const app = require('./app');
const { PORT } = require('./constants');

app.use(notfound)
// Start the server
app.listen(PORT, () => {
console.log(`Server is running on http://localhost:${PORT}`);
Expand Down
7 changes: 7 additions & 0 deletions templates/src/middlewares/notfound.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const notfound=((req,res)=>{
res.status(404).json({
success: false,
message: "Route not Found"
})
})
module.exports= notfound