Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
mvc-node-express
Advanced tools
modern node js and express framework in MVC architecture if you are work with php/laravel framework so this is great because you know this framework architecture
you can do this with 2 ways:
1 - download project from github
2 - download project from gitlab
3 - use NPM
i'll explain about installing with npm
for that first you must create a folder and run:
npm init
after that some question will asking from your application answer them and after that run :
npm i mvc-node-express
after that if you using Windows please add this line to your package.json in script field
"build":"move node_modules/mvc-node-express ./ && rmdir /s node_modules && Del package-lock.json && Del package.json"
or if you use linux/mac OS add this line:
"build":"mv node_modules/mvc-node-express ./ && rm -r node_modules && rm package-lock.json && rm package.json"
after that you save this and run:
npm run build
if you use windows :
one question ask from you and you must type y enter
after that you can see mvc-node-express folder insted
of your other files enter to that and run:
npm install
for installing dependencies and thats it
congratulations :wine_glass: :wine_glass:
lets look at this framework architecture
|---app
| |---Controllers
| | |---Auth
| |---Middleware
| | |---Auth
| |---Models
|
|
|---public
| |---css
| |---fonts
| |---images
| |---img
| |---js
| |---scss
| |---vendor
|
|
|---routes
|
|
|---views
|
|
|---.gitignore
|
|---package-lock.json
|
|---package.json
|
|---server.js
this folder conatins 3 subfolders:
this folder is used to place any Controller you want in your application this folder has a subfolder with Auth name that contains Controllers used in register/login
this folder is used to place any Middleware you want in your application this folder has a subfolder with Auth name that contains Middleware used in register/login
this folder is used to place any Models you want in your application by default we put User Model in it that used for Auth system
this folder is a place to hold static files like css,js,images,... every static file you need put in your project you must put it in this folder
this folder contain some files [router.js, requests.js, api.js]
this file contain any route in your application Auth routes added by Default validation filters are comming in this file with an array but catching errors
this file contain a class that has some methods for sending api request to another server this class added in both router and api files you can use it by typing Request
this file contains any route for send data with api for another platforms passing to Middleware
this folder contains any view file that used in your project default engine of this framework is PUG engine
server.js file contains codes that you need to start your server the default port after start the application is 800 you can start your server in developer mode with:
npm run dev
or you can run application in production mode by:
npm run production
after that you can see your application in:
http://localhost:800
github page : mvc-node-express
gitlab page : mvc-node-express
NPM page : mvc-node-express
FAQs
MVC framework for express js
The npm package mvc-node-express receives a total of 0 weekly downloads. As such, mvc-node-express popularity was classified as not popular.
We found that mvc-node-express demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.