Skip to content

Commit 6c4dba2

Browse files
committed
awesome updates
1 parent b16db50 commit 6c4dba2

File tree

11 files changed

+86
-0
lines changed

11 files changed

+86
-0
lines changed

.env.example

Whitespace-only changes.

.plan

Whitespace-only changes.

README.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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

app.js

Whitespace-only changes.

cKey.js

Whitespace-only changes.

core/custom-subfolers-example/example1.js

Whitespace-only changes.

core/custom-subfolers-example/example2.js

Whitespace-only changes.

core/custom-subfolers-example/example3.js

Whitespace-only changes.

core/hello-world.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// function that returns "hello world" when called.
2+
const iDisplayHelloWorld = () => return "Hello World";
3+
4+
// export iDisplayHelloWorld function.
5+
module.exports = iDisplayHelloWorld;

core/sample-script.js

Whitespace-only changes.

package.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "nodejs-boilerplate",
3+
"version": "1.0.0",
4+
"description": "Clean and minimalistic boilerplate to start your NodeJs project.",
5+
"main": "app.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"start": "node app.js"
9+
},
10+
"keywords": [
11+
"NodeJs Boilerplate",
12+
"Kickstarter project for node"
13+
],
14+
"author": "Jorge Rosal",
15+
"license": "MIT",
16+
"dependencies": {
17+
"dotenv": "^6.1.0"
18+
}
19+
}

0 commit comments

Comments
 (0)