Skip to content

A full stack application that lets users upload random ideas.

Notifications You must be signed in to change notification settings

thejosehuerta/randomideas-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RandomIdeas App

This is a fullstack application for sharing random ideas. It is a project built following the Modern JS From The Beginning course provided by Traversy Media.

I built this application as a way to learn how to build a full stack application using Node.js/Express REST API that uses MongoDB for a database. The client-side is built with Webpack and vanilla JavaScript.

Usage

Install Dependencies

Install dependencies on the front-end and back-end

npm install
cd client
npm install

Back-end/Express Server

npm start

or

npm run dev (Nodemon)

Visit http://localhost:4000

Front-end/Webpack Dev Server

cd client
npm run dev

Visit http://localhost:3000

To build front-end production files

cd client
npm run build

The production build will be put into the public folder, which is the Express static folder.

Environment Variables

Rename .env-example to .env and add your MongoDB URI to the .env file.

MONGO_URI=your_mongodb_uri

REST Endpoints

Ideas

Endpoint Description Method Body
/api/ideas Get all ideas GET None
/api/ideas/:id Get idea by id GET None
/api/ideas Add idea POST { text, tag, username }
/api/ideas/:id Delete idea DELETE username

When updating or deleting, the username must match the username of the idea creator.

About

A full stack application that lets users upload random ideas.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published