Skip to content

Commit 1a2fb10

Browse files
committed
Code files added
1 parent 52d527c commit 1a2fb10

38 files changed

+6057
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
.DS_Store
3+
config/config.env

README.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,45 @@
1-
# Node.js-API-Masterclass-with-Express-and-MongoDB
2-
Node.js API Masterclass with Express and MongoDB [Video], published by Packt
1+
# DevCamper API
2+
3+
> Backend API for DevCamper application, which is a bootcamp directory website
4+
5+
## Usage
6+
7+
Rename "config/config.env.env" to "config/config.env" and update the values/settings to your own
8+
9+
## Install Dependencies
10+
11+
```
12+
npm install
13+
```
14+
15+
## Run App
16+
17+
```
18+
# Run in dev mode
19+
npm run dev
20+
21+
# Run in prod mode
22+
npm start
23+
```
24+
25+
## Database Seeder
26+
27+
To seed the database with users, bootcamps, courses and reviews with data from the "\_data" folder, run
28+
29+
```
30+
# Destroy all data
31+
node seeder -d
32+
33+
# Import all data
34+
node seeder -i
35+
```
36+
37+
## Demo
38+
39+
The API is live at [devcamper.io](https://devcamper.io)
40+
41+
Extensive documentation with examples [here](https://documenter.getpostman.com/view/8923145/SVtVVTzd?version=latest)
42+
43+
- Version: 1.0.0
44+
- License: MIT
45+
- Author: Brad Traversy

_data/bootcamps.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
[
2+
{
3+
"_id": "5d713995b721c3bb38c1f5d0",
4+
"user": "5d7a514b5d2c12c7449be045",
5+
"name": "Devworks Bootcamp",
6+
"description": "Devworks is a full stack JavaScript Bootcamp located in the heart of Boston that focuses on the technologies you need to get a high paying job as a web developer",
7+
"website": "https://devworks.com",
8+
"phone": "(111) 111-1111",
9+
"email": "[email protected]",
10+
"address": "233 Bay State Rd Boston MA 02215",
11+
"careers": ["Web Development", "UI/UX", "Business"],
12+
"housing": true,
13+
"jobAssistance": true,
14+
"jobGuarantee": false,
15+
"acceptGi": true
16+
},
17+
{
18+
"_id": "5d713a66ec8f2b88b8f830b8",
19+
"user": "5d7a514b5d2c12c7449be046",
20+
"name": "ModernTech Bootcamp",
21+
"description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
22+
"website": "https://moderntech.com",
23+
"phone": "(222) 222-2222",
24+
"email": "[email protected]",
25+
"address": "220 Pawtucket St, Lowell, MA 01854",
26+
"careers": ["Web Development", "UI/UX", "Mobile Development"],
27+
"housing": false,
28+
"jobAssistance": true,
29+
"jobGuarantee": false,
30+
"acceptGi": true
31+
},
32+
{
33+
"_id": "5d725a037b292f5f8ceff787",
34+
"user": "5c8a1d5b0190b214360dc031",
35+
"name": "Codemasters",
36+
"description": "Is coding your passion? Codemasters will give you the skills and the tools to become the best developer possible. We specialize in full stack web development and data science",
37+
"website": "https://codemasters.com",
38+
"phone": "(333) 333-3333",
39+
"email": "[email protected]",
40+
"address": "85 South Prospect Street Burlington VT 05405",
41+
"careers": ["Web Development", "Data Science", "Business"],
42+
"housing": false,
43+
"jobAssistance": false,
44+
"jobGuarantee": false,
45+
"acceptGi": false
46+
},
47+
{
48+
"_id": "5d725a1b7b292f5f8ceff788",
49+
"user": "5c8a1d5b0190b214360dc032",
50+
"name": "Devcentral Bootcamp",
51+
"description": "Is coding your passion? Codemasters will give you the skills and the tools to become the best developer possible. We specialize in front end and full stack web development",
52+
"website": "https://devcentral.com",
53+
"phone": "(444) 444-4444",
54+
"email": "[email protected]",
55+
"address": "45 Upper College Rd Kingston RI 02881",
56+
"careers": [
57+
"Mobile Development",
58+
"Web Development",
59+
"Data Science",
60+
"Business"
61+
],
62+
"housing": false,
63+
"jobAssistance": true,
64+
"jobGuarantee": true,
65+
"acceptGi": true
66+
}
67+
]

_data/courses.json

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
[
2+
{
3+
"_id": "5d725a4a7b292f5f8ceff789",
4+
"title": "Front End Web Development",
5+
"description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue",
6+
"weeks": 8,
7+
"tuition": 8000,
8+
"minimumSkill": "beginner",
9+
"scholarshipsAvailable": true,
10+
"bootcamp": "5d713995b721c3bb38c1f5d0",
11+
"user": "5d7a514b5d2c12c7449be045"
12+
},
13+
{
14+
"_id": "5d725c84c4ded7bcb480eaa0",
15+
"title": "Full Stack Web Development",
16+
"description": "In this course you will learn full stack web development, first learning all about the frontend with HTML/CSS/JS/Vue and then the backend with Node.js/Express/MongoDB",
17+
"weeks": 12,
18+
"tuition": 10000,
19+
"minimumSkill": "intermediate",
20+
"scholarshipsAvailable": true,
21+
"bootcamp": "5d713995b721c3bb38c1f5d0",
22+
"user": "5d7a514b5d2c12c7449be045"
23+
},
24+
{
25+
"_id": "5d725cb9c4ded7bcb480eaa1",
26+
"title": "Full Stack Web Dev",
27+
"description": "In this course you will learn all about the front end with HTML, CSS and JavaScript. You will master tools like Git and Webpack and also learn C# and ASP.NET with Postgres",
28+
"weeks": 10,
29+
"tuition": 12000,
30+
"minimumSkill": "intermediate",
31+
"scholarshipsAvailable": true,
32+
"bootcamp": "5d713a66ec8f2b88b8f830b8",
33+
"user": "5d7a514b5d2c12c7449be046"
34+
},
35+
{
36+
"_id": "5d725cd2c4ded7bcb480eaa2",
37+
"title": "UI/UX",
38+
"description": "In this course you will learn to create beautiful interfaces. It is a mix of design and development to create modern user experiences on both web and mobile",
39+
"weeks": 12,
40+
"tuition": 10000,
41+
"minimumSkill": "intermediate",
42+
"scholarshipsAvailable": true,
43+
"bootcamp": "5d713a66ec8f2b88b8f830b8",
44+
"user": "5d7a514b5d2c12c7449be046"
45+
},
46+
{
47+
"_id": "5d725ce8c4ded7bcb480eaa3",
48+
"title": "Web Design & Development",
49+
"description": "Get started building websites and web apps with HTML/CSS/JavaScript/PHP. We teach you",
50+
"weeks": 10,
51+
"tuition": 12000,
52+
"minimumSkill": "beginner",
53+
"scholarshipsAvailable": true,
54+
"bootcamp": "5d725a037b292f5f8ceff787",
55+
"user": "5c8a1d5b0190b214360dc031"
56+
},
57+
{
58+
"_id": "5d725cfec4ded7bcb480eaa4",
59+
"title": "Data Science Program",
60+
"description": "In this course you will learn Python for data science, machine learning and big data tools",
61+
"weeks": 10,
62+
"tuition": 9000,
63+
"minimumSkill": "intermediate",
64+
"scholarshipsAvailable": false,
65+
"bootcamp": "5d725a037b292f5f8ceff787",
66+
"user": "5c8a1d5b0190b214360dc031"
67+
},
68+
{
69+
"_id": "5d725cfec4ded7bcb480eaa5",
70+
"title": "Web Development",
71+
"description": "This course will teach you how to build high quality web applications with technologies like React, Node.js, PHP & Laravel",
72+
"weeks": 8,
73+
"tuition": 8000,
74+
"minimumSkill": "beginner",
75+
"scholarshipsAvailable": false,
76+
"bootcamp": "5d725a1b7b292f5f8ceff788",
77+
"user": "5c8a1d5b0190b214360dc032"
78+
},
79+
{
80+
"_id": "5d725cfec4ded7bcb480eaa6",
81+
"title": "Software QA",
82+
"description": "This course will teach you everything you need to know about quality assurance",
83+
"weeks": 6,
84+
"tuition": 5000,
85+
"minimumSkill": "intermediate",
86+
"scholarshipsAvailable": false,
87+
"bootcamp": "5d725a1b7b292f5f8ceff788",
88+
"user": "5c8a1d5b0190b214360dc032"
89+
},
90+
{
91+
"_id": "5d725cfec4ded7bcb480eaa7",
92+
"title": "IOS Development",
93+
"description": "Get started building mobile applications for IOS using Swift and other tools",
94+
"weeks": 8,
95+
"tuition": 6000,
96+
"minimumSkill": "intermediate",
97+
"scholarshipsAvailable": false,
98+
"bootcamp": "5d725a1b7b292f5f8ceff788",
99+
"user": "5c8a1d5b0190b214360dc032"
100+
}
101+
]

_data/reviews.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
[
2+
{
3+
"_id": "5d7a514b5d2c12c7449be020",
4+
"title": "Learned a ton!",
5+
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
6+
"rating": "8",
7+
"bootcamp": "5d713995b721c3bb38c1f5d0",
8+
"user": "5c8a1d5b0190b214360dc033"
9+
},
10+
{
11+
"_id": "5d7a514b5d2c12c7449be021",
12+
"title": "Great bootcamp",
13+
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
14+
"rating": "10",
15+
"bootcamp": "5d713995b721c3bb38c1f5d0",
16+
"user": "5c8a1d5b0190b214360dc034"
17+
},
18+
{
19+
"_id": "5d7a514b5d2c12c7449be022",
20+
"title": "Got me a developer job",
21+
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
22+
"rating": "7",
23+
"bootcamp": "5d713a66ec8f2b88b8f830b8",
24+
"user": "5c8a1d5b0190b214360dc035"
25+
},
26+
{
27+
"_id": "5d7a514b5d2c12c7449be023",
28+
"title": "Not that great",
29+
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
30+
"rating": "4",
31+
"bootcamp": "5d713a66ec8f2b88b8f830b8",
32+
"user": "5c8a1d5b0190b214360dc036"
33+
},
34+
{
35+
"_id": "5d7a514b5d2c12c7449be024",
36+
"title": "Great overall experience",
37+
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
38+
"rating": "7",
39+
"bootcamp": "5d725a037b292f5f8ceff787",
40+
"user": "5c8a1d5b0190b214360dc037"
41+
},
42+
{
43+
"_id": "5d7a514b5d2c12c7449be025",
44+
"title": "Not worth the money",
45+
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
46+
"rating": "5",
47+
"bootcamp": "5d725a037b292f5f8ceff787",
48+
"user": "5c8a1d5b0190b214360dc038"
49+
},
50+
{
51+
"_id": "5d7a514b5d2c12c7449be026",
52+
"title": "Best instructors",
53+
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
54+
"rating": "10",
55+
"bootcamp": "5d725a1b7b292f5f8ceff788",
56+
"user": "5c8a1d5b0190b214360dc039"
57+
},
58+
{
59+
"_id": "5d7a514b5d2c12c7449be027",
60+
"title": "Was worth the investment",
61+
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
62+
"rating": "7",
63+
"bootcamp": "5d725a1b7b292f5f8ceff788",
64+
"user": "5c8a1d5b0190b214360dc040"
65+
}
66+
]

_data/users.json

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
[
2+
{
3+
"_id": "5d7a514b5d2c12c7449be042",
4+
"name": "Admin Account",
5+
"email": "[email protected]",
6+
"role": "user",
7+
"password": "123456"
8+
},
9+
{
10+
"_id": "5d7a514b5d2c12c7449be043",
11+
"name": "Publisher Account",
12+
"email": "[email protected]",
13+
"role": "publisher",
14+
"password": "123456"
15+
},
16+
{
17+
"_id": "5d7a514b5d2c12c7449be044",
18+
"name": "User Account",
19+
"email": "[email protected]",
20+
"role": "user",
21+
"password": "123456"
22+
},
23+
{
24+
"_id": "5d7a514b5d2c12c7449be045",
25+
"name": "John Doe",
26+
"email": "[email protected]",
27+
"role": "publisher",
28+
"password": "123456"
29+
},
30+
{
31+
"_id": "5d7a514b5d2c12c7449be046",
32+
"name": "Kevin Smith",
33+
"email": "[email protected]",
34+
"role": "publisher",
35+
"password": "123456"
36+
},
37+
{
38+
"_id": "5c8a1d5b0190b214360dc031",
39+
"name": "Mary Williams",
40+
"email": "[email protected]",
41+
"role": "publisher",
42+
"password": "123456"
43+
},
44+
{
45+
"_id": "5c8a1d5b0190b214360dc032",
46+
"name": "Sasha Ryan",
47+
"email": "[email protected]",
48+
"role": "publisher",
49+
"password": "123456"
50+
},
51+
{
52+
"_id": "5c8a1d5b0190b214360dc033",
53+
"name": "Greg Harris",
54+
"email": "[email protected]",
55+
"role": "user",
56+
"password": "123456"
57+
},
58+
{
59+
"_id": "5c8a1d5b0190b214360dc034",
60+
"name": "Derek Glover",
61+
"email": "[email protected]",
62+
"role": "user",
63+
"password": "123456"
64+
},
65+
{
66+
"_id": "5c8a1d5b0190b214360dc035",
67+
"name": "Stephanie Hanson",
68+
"email": "[email protected]",
69+
"role": "user",
70+
"password": "123456"
71+
},
72+
{
73+
"_id": "5c8a1d5b0190b214360dc036",
74+
"name": "Jerry Wiliams",
75+
"email": "[email protected]",
76+
"role": "user",
77+
"password": "123456"
78+
},
79+
{
80+
"_id": "5c8a1d5b0190b214360dc037",
81+
"name": "Maggie Johnson",
82+
"email": "[email protected]",
83+
"role": "user",
84+
"password": "123456"
85+
},
86+
{
87+
"_id": "5c8a1d5b0190b214360dc038",
88+
"name": "Barry Dickens",
89+
"email": "[email protected]",
90+
"role": "user",
91+
"password": "123456"
92+
},
93+
{
94+
"_id": "5c8a1d5b0190b214360dc039",
95+
"name": "Ryan Bolin",
96+
"email": "[email protected]",
97+
"role": "user",
98+
"password": "123456"
99+
},
100+
{
101+
"_id": "5c8a1d5b0190b214360dc040",
102+
"name": "Sara Kensing",
103+
"email": "[email protected]",
104+
"role": "user",
105+
"password": "123456"
106+
}
107+
]

0 commit comments

Comments
 (0)