GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Programming-PH/nodejs-boilerplate: 🌈A simple nodejs boilerplate to speed-up your project.

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
core
core
 
 
.env.example
.env.example
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
.plan
.plan
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
app.js
app.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

A NodeJs Project Kickstarter Biolerplate

Clean, minimalistic boilerplate to start your NodeJs project. It helps you structure your file in a more conventional way.

NodeJS is far too powerful to be limited to just running your website. Whether building a website, communicating with the database or writing a script to automate a file process, you can't go wrong with NodeJS.

⭐ Good for

  • Building a worker scripts.
  • Stand-alone scripting and automation tool.
  • Fully customizable project.
  • Forcing you to write clean-easy-to-read code.
  • Clean file structuring.
  • Following standard naming conventions so collaborators/team8s can understand easily your code.
  • Securing your login and api key details by using environment variable -- dotenv

📂 Prerequisites

  • NodeJs, git installed in your local environment.
  • 🔐 .env file -- Yes you need this! 🔑🔑🔑

📝 Usage

  1. Clone the repo to your local environment.
  • In the command prompt run the following commands:
    $ git clone https://github.com/yortrosal/nodejs-boilerplate.git
    $ cd nodejs-boilerplate
    
  1. run $ npm install to install initial dependencies.
  2. Make sure you have .env file available. Or generate one: $ cp .env.example .env (edit it with your secret keys and other credentials)
  3. Once you have the .env file setup in the main directory.
  4. run ▶️ $ npm start to start the program. It will run the script from the app.js file.
  5. Modify the package.json file. Edit the project name and other stuff.
  6. Finally, start and build your application scripts. Customize your project however you like.

Recommendation

Try to add your script and other stuff inside /core folder. If you want to run specific script inside the ./core folder, try to set it in package.json script. For example, when you try to run ./core/hello-world.js, instead of cd core && node hello-world, you can use a command that was set in package.json file npm run hello-world.

📘 Why is it important to use env file?

It has variety of usage. Find out more. But the sole purpose of using .env file for our project is to secure our credentials such as logins, api keys, and other important stuff. It is important not to include your .env file in our repository specially when your project is public.

🏗 Project Structure

nodejs-boilerplate
  ├── core
  │   ├── custom-subfolder-example
  │   │   ├── example1.js
  │   │   ├── example2.js
  │   │   └── example3.js
  │   │
  │   ├── access-credentials.js
  │   └── hello-world.js
  │
  ├── .env.example
  ├── .env  // store all your credentials here
  ├── .plans
  ├── .gitignore
  ├── app.js
  ├── package.json
  └── README.md

Initial Dependency

  • ckey - a dotenv helper for accessing process.env object from sub-directory.

Storing Credentials in .env file

  • This is where you put your login credentials, secret keys, and other confidential information. Never include when you commit your repository. Make sure it is included in .gitignore file so it wont be included.

💬 Tech Support

  • If things went wrong, google it first. People ahead of you have had similar issues in the past and solved it.
  • Last resort. -- Contact Jorge. He'd be happy to help you.

🎩 Authors

  • Jorge Rosal - GitHub

Contribution

  • Feel free to submin PR. Please follow ESLINT Rule.

📜 License

The MIT License (MIT) Jorge Rosal

About

🌈A simple nodejs boilerplate to speed-up your project.

Topics

nodejsnodejs-botnodejs-developmentnodejs-frameworknodejs-script

Resources

Readme
MIT license
Activity
Custom properties

Stars

4 stars

Watchers

3 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.