Open 3bdoYasser opened 1 year ago
CREATE README.md
# simple-test
CREATE app.js
const express = require('express');
const app = express();
const port = 3000;
const homeController = require('./controllers/homeController');
app.get('/', homeController.index);
app.listen(port, () => {
console.log(`App listening at http://localhost:${port}`)
});
CREATE package.json
{
"name": "simple-test",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"start": "node app.js"
},
"dependencies": {
"express": "^4.17.1"
}
}
CREATE controllers/homeController.js
exports.index = function(req, res) {
res.send('Hello World!');
};
CREATE controllers/testController.js
exports.test = (req, res) => {
res.send('Hello World!');
};
CREATE models/homeModel.js
// This file is intentionally left blank as a placeholder for future model definitions.
CREATE routes/testRoute.js
const express = require('express');
const testController = require('../controllers/testController');
const router = express.Router();
router.get('/', testController.test);
module.exports = router;
CREATE views/homeView.js
// This file is intentionally left blank as a placeholder for future view definitions.
This project is a simple Express.js application. It has a basic file structure with a main app.js file that sets up the server and routes. The controllers handle the logic for each route. The models and views are placeholders for future development. The package.json file contains the project metadata and dependencies.
make professional presentation that explain all things in the poject