// import mongoose
const mongoose = require("mongoose")
// read your .env
require("dotenv").config()
// GET YOUR DATABASE_URL VARIABLE FROM YOU .ENV - mongodb://username:password@myhost.com/mydatabasename
const DATABASE_URL = process.env.DATABASE_URL
Web works via browsers and servers.
- Users type in urls, click on links, submit forms
- The browsers sends a request
- a server receives the request and responds
- may response with html, files, json, etc.
Servers can be written in javascript with a javascript run time, and there are three of them:
Bootcamps can be intense and fast paced but anyone at any level can succeed in them, especially if they make the commitment and do some prep beforehand which makes the experience a lot less intense so you can focus on the quality of your work versus just keeping up.
Regardless of the length of your particular bootcamp, during that time anything you can take off your plate should be taken off your plate so you can accomodate at least 3 hours for doing homework, practice and research for every 8 hours of class time.
- if your doing 40 hours of class per week, you should expect minimum 15 hours of out of class work per week.
- If your doing 16 hours of class per week, you should expect minimum 6 hours of out of class work per week.
Data that is organized to meet a schema. Think tables which organize data into rows and columns.
Data is unorganized and lacks a schema. Imagine collections of html documents including text and images not organized in any consistent way.
///////////////////////////////// | |
// ./models/connection.js | |
///////////////////////////////// | |
// PURPOSE OF THIS FILE TO CONNECT TO MONGO AND EXPORT CONNECTED MONGO OBJECT | |
require("dotenv").config(); // Loads variables from .env into the process.env object | |
const mongoose = require('mongoose'); // import a fresh mongoose object | |
//connect to our db | |
mongoose.connect( |
So your going to be working in a group to develop a small application, this guide will help walk your through the basic steps to get setup as a group for good progress as a group.
Some helpful videos:
-
a repo: a folder whose files and subfolders are being tracked in on commit chain
-
staging: files that have been marked to be included in the next commit
-
commit: a snapshot of files in the repo marking all changes in staged files since the last commit
-
remote: a repo hosted elsewhere that receives commits from your local repo via pushes and can send your local repo commits via pull