|
| 1 | +# A NodeJs Project Kickstarter Biolerplate |
| 2 | +Clean and minimalistic boilerplate to start your NodeJs project. |
| 3 | + |
| 4 | +### ⭐ Good for |
| 5 | + - Building a worker scripts. |
| 6 | + - Scraper and parser tool. |
| 7 | + - Stand-alone, fully customizable project. |
| 8 | + - Creating clean file structured project. |
| 9 | + |
| 10 | +### 📘 Prerequisites |
| 11 | + - NodeJs Installed in your local environment. |
| 12 | + - .env file -- Yes you need this! |
| 13 | + |
| 14 | +### 📝 Usage |
| 15 | +1. Clone the repo to your local environment. |
| 16 | + - On the command prompt run the following commands: |
| 17 | + ``` |
| 18 | + $ git clone https://github.com/yortrosal/nodejs-boilerplate.git |
| 19 | + $ cd nodejs-boilerplate |
| 20 | + ``` |
| 21 | +2. ```npm install``` to install initial dependencies. |
| 22 | +3. Make sure you have .env file available. |
| 23 | + Or generate one: ```cp .env.example .env``` (edit it with your secret keys and other credentials) |
| 24 | +4. Once you have the .env file setup in the main directory. |
| 25 | +5. run ▶️ ```npm start``` to start the program. It will run the script from the app.js file. |
| 26 | +6. Modify the package.json file. Edit the project name and other stuff. |
| 27 | +7. Finally, start and build your application scripts. |
| 28 | + |
| 29 | +### 📘 Why is it important to use env file? |
| 30 | +It has variety of usage. Find out [more](https://codeburst.io/process-env-what-it-is-and-why-when-how-to-use-it-effectively-505d0b2831e7). |
| 31 | +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 when you in our repository specially when your project is public. It's easy |
| 32 | + |
| 33 | +### Accessing your credentials from .env file. |
| 34 | + |
| 35 | + |
| 36 | +## 🏗 Project Structure |
| 37 | + nodejs-boilerplate |
| 38 | + ├── core |
| 39 | + │ ├── custom-subfolder-example |
| 40 | + │ │ ├── example1.js |
| 41 | + │ │ ├── example2.js |
| 42 | + │ │ └── example3.js |
| 43 | + │ │ |
| 44 | + │ ├── your-script.js |
| 45 | + │ └── hello-world.js |
| 46 | + │ |
| 47 | + ├── .env.example |
| 48 | + ├── .env |
| 49 | + ├── .gitignore |
| 50 | + ├── package.json |
| 51 | + └── README.md |
| 52 | + |
| 53 | +### 💬 Tech Support |
| 54 | + - If things went wrong, google it first. People ahead of you have had similar issues in the past and solved it. |
| 55 | + - Last resort. -- Contact Jorge. He'd be happy to help you. |
| 56 | + |
| 57 | +### 🎩 Authors |
| 58 | + - Jorge Rosal - [GitHub](https://github.com/yortrosal) |
| 59 | + - <your name here> |
| 60 | + |
| 61 | +### 📜 License |
| 62 | +The MIT License (MIT) Jorge Rosal |
0 commit comments