
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
vite-jon-lang
Advanced tools
A template repository to kickstart your Node.js projects with a clean and organized structure. This repository serves as a starting point for your new projects, helping you focus on building great applications right from the beginning.
Welcome to Quick Start Node, a template repository to kickstart your Node.js projects with a solid foundation and best practices.
Quick Start Node provides a generic starting point for your Node.js projects, complete with a well-organized project structure, common dependencies, and essential configurations. It's designed to help you save time and ensure consistency across your projects.
Follow these steps to get your project up and running:
cd quick-start-node.npm install.cat ./env/example.json | tee ./env/development.json ./env/production.json ./env/test.json > /dev/null.npm run startThis template covers the basic structure and setup of a Node.js project. You can adapt it for various types of applications:
src/routes and src/controllers directories.src/models directory.src/middleware directory.index.js file.development.json, test.json and production.json in same directory and add or change the data. You can run this in in your package root also cat ./env/example.json | tee ./env/development.json ./env/production.json ./env/test.json > /dev/null.npm run dev.npm run test:unitnpm run test:integrationFor other dependencies please check package.json file.
You can use these commands to print your project tress:
CMD: tree /A /F | findstr /V /C:"node_modules"
POWERSHELL: Get-ChildItem -Recurse | Where-Object { $_.FullName -notlike "*\node_modules\*" } | ForEach-Object { $_.FullName }
UBUNTU (WSL): tree --prune -I 'node_modules' --dirsfirst or tree -a -I 'node_modules|.git' --dirsfirst
quick-start-node/
βββ .github
β βββ workflows
β βββ build-lint-test.yml
βββ .vscode
β βββ extensions.json
β βββ settings.json
βββ env
β βββ development.json
β βββ example.json
β βββ production.json
β βββ test.json
βββ logs
β βββ error.log
β βββ uncaught-exceptions.log
β βββ unhandled-rejections.log
βββ public
β βββ data
β β βββ http-status-codes.js
β β βββ programming-error-codes.js
β βββ images
β β βββ avatar1.png
β β βββ avatar2.png
β βββ styles
β βββ index.min.css
βββ src
β βββ assets
β β βββ scss
β β βββ _about-us.scss
β β βββ _contact-us-email-template.scss
β β βββ _contact-us.scss
β β βββ _footer.scss
β β βββ _header.scss
β β βββ _home.scss
β β βββ _page-not-found.scss
β β βββ _variables.scss
β β βββ index.scss
β βββ configurations
β β βββ index.js
β β βββ logger.js
β β βββ mongo-atlas.js
β β βββ nodemailer.js
β β βββ set-environment-config.js
β βββ controllers
β β βββ auth-controller.js
β β βββ index.js
β β βββ pages-controller.js
β β βββ reset-password-controller.js
β β βββ user-controller.js
β βββ middlewares
β β βββ async-error-handler.js
β β βββ index.js
β β βββ is-authenticated-middleware.js
β β βββ is-valid-object-id-middleware.js
β β βββ log-request-info-middleware.js
β β βββ uncaught-errors-middleware.js
β β βββ use-middlewares.js
β β βββ validate-and-sanitize-request-middleware.js
β βββ models
β β βββ Temporary-Token.js
β β βββ User.js
β β βββ index.js
β βββ routes
β β βββ auth-route.js
β β βββ index.js
β β βββ pages-route.js
β β βββ reset-password-route.js
β β βββ user-route.js
β βββ utilities
β β βββ format-error.js
β β βββ format-response.js
β β βββ get-project-name.js
β β βββ index.js
β β βββ string-utilities.js
β βββ validators
β β βββ auth-validators.js
β β βββ index.js
β β βββ pages-validators.js
β β βββ reuseable-validators.js
β β βββ user-validators.js
β βββ views
β βββ components
β β βββ footer-mixin.pug
β β βββ header-mixin.pug
β βββ emails
β β βββ email-template.pug
β βββ about-us.pug
β βββ contact-us.pug
β βββ home.pug
β βββ page-not-found.pug
βββ tests
β βββ integration
β β βββ routes
β β βββ user.test.js
β βββ unit
β β βββ configs
β β β βββ mongo-atlas.test.js
β β βββ middlewares
β β β βββ is-authenticated.test.js
β β βββ models
β β βββ User.test.js
β βββ setup.js
βββ .eslintrc.json
βββ .gitignore
βββ LICENSE
βββ README.md
βββ index.js
βββ package-lock.json
βββ package.json
is-authenticated-user.js).user-route.js, user-controller.js, user-middleware.js.User).User-Class.js).The project employs a meticulous folder structure to uphold a neat and methodical codebase:
/public: Serves as the repository for static files./env: Hosts environment and confidential files, catering to various environments. Files such as development.json, test.json, and production.json are ignored; however, an illustrative example.json is included./tests: Houses test files, further categorized into:
/unit: Reflects the /src structure, housing unit tests./integration: Resonates with the /src layout and contains integration tests./src: The primary source folder, home to JavaScript files and a spectrum of subfolders encompassing distinct components:
/assets: Designated for assets, including SCSS and more./configurations: Houses assorted settings like MongoDB, logger, and nodemailer./controllers: Encompasses code pertinent to route handlers./middlewares: Hosts middleware modules catering to application logic./models: Encapsulates schemas and methods tailored for database models./routes: Holds handler functions for diverse API endpoints./utilities: Features utility functions and classes./validators: Contains validation logic dedicated to user data./views: Nurtures the creation of views and components via the Pug templating engine.Routes are created using Express.js routes. Some of them are:
/api//api/about-us/api/contact-us/api/users//api/users/me/api/users/:userId/api/auth/login/api/auth/logout/api/reset-passwordSome of the status codes used are see all here in a file:
200 Used when you get data successfully.201 Used when your data created successfully.400 Used when there is bad request from the client.401 Used when user is not authenticated.403 Used when user is authenticated but do not have permissions to access resource.404 Used when data not found.422 Used when payload key(s) is valid but the data in the key(s) are unprocessable.500 is used for internal server error.Contributions are welcome! If you encounter issues or have improvements to suggest, please create a pull request.
Thank you for considering contributing to this project!
This project is licensed under the MIT License.
FAQs
A template repository to kickstart your Node.js projects with a clean and organized structure. This repository serves as a starting point for your new projects, helping you focus on building great applications right from the beginning.
We found that vite-jon-lang 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.