Clone repo
git clone https://github.com/JacobWylie/yelpcamp.git
Install modules and run app
npm install
npm start
app.use('/camp', indexRoutes);
app.use('/camp/campgrounds/:id/comments', commentRoutes);
app.use('/camp/campgrounds', campgroundRoutes);
res.redirect(`/camp/campgrounds/${newlyCreated._id}`);
<form class="search-form" action="/camp/campgrounds" method="GET">
<a href="/camp/campgrounds/<%= campground._id %>"
Set the database URL that your app will connect to. The app will connect to a public database if you do not specify your own
$ export DATABASEURL="your-databaseURL"
Name your database to notify you in the console when app is running
$ export DATABASENAME="your-database-name"
Set your preferred port number. The Default port is set to 3000
$ export PORT="whichever-port-number-you-like"
Set the admin password for a user to sign up with admin priviledges
$ export ADMINCODE="your-secret-code"
Set the database URL that your app will connect to. The app will connect to a public database if you do not specify your own
$ SET DATABASEURL="your-databaseURL"
Name your database to notify you in the console when app is running
$ SET DATABASENAME="your-database-name"
Set your preferred port number. The Default port is set to 3000
$ SET PORT="whichever-port-number-you-like"
Set the admin password for a user to sign up with admin priviledges
$ SET ADMINCODE="your-secret-code"
- Add Landing Page
- Add Campgrounds Page that lists all campgrounds
- Each Campground has:
- Name
- Image
INDEX | /dogs | GET | Display a list of all dogs
NEW | /dogs/new | GET | Displays form to make a new dog
CREATE | /dogs | POST | Add new dog to DB
SHOW | /dogs/:id | GET | Shows info about one dog
INDEX | /campgrounds
NEW | /campgrounds/new
CREATE | /campgrounds
SHOW | /campgrounds/:id
NEW | campgrounds/:id/comments/new
CREATE campgrounds/:id/comments