Coder Social home page Coder Social logo

eclectic-carnival's Introduction

Eclectic Carnival

status: stable, version 1.0.0

License: GNU General Publice License v3.0

Description

Eclectic Carnival is an Express.js & Mongoose API back end for a social network.

Users can create thoughts and other users can post reactions to the thoughts. Users can add other users as friends. EC utilizes asynchronous JavaScript functions and performs CRUD functions (Create, Read, Update, and Delete) on users, thoughts, and reactions.

When a user deletes their account, all their thoughts are also deleted.

It uses Luxon to return formatted datetimes. Luxon is the chosen successor to Moment.js. See more here.

The app uses the Mongoose, Express, and Luxon Node.js packages.

User Story

AS A social media startup
I WANT an API for my social network that uses a NoSQL database
SO THAT my website can handle large amounts of unstructured data

AS A developer of a social media website
GIVEN a social network API
WHEN I enter the command to invoke the application
THEN my server is started and the Mongoose models are synced to the MongoDB database
WHEN I open API GET routes in Insomnia for users and thoughts
THEN the data for each of these routes is displayed in a formatted JSON
WHEN I test API POST, PUT, and DELETE routes in Insomnia
THEN I am able to successfully create, update, and delete users and thoughts in my database
WHEN I test API POST and DELETE routes in Insomnia
THEN I am able to successfully create and delete reactions to thoughts and add and remove friends to a user’s friend list

Table of Contents

  1. Description
  2. Installation
  3. Usage
  4. Demonstration
  5. License
  6. Questions

Installation

To start using Eclectic Carnival, first clone the repo to your server. Then run npm i to install all the dependent packages.

Next, open connection.js in the config folder. Supply your own MongoDB hostname and database name if applicable. Alternatively, create an environment variable in your hosting platform with the key MONGODB_URI and the hostname and database name of your MongoDb as the value.

Lastly, you may seed the database by running the command npm run seed. If you are using Heroku, the seed file will automatically run when the app build is complete. To remove this behavior, edit the package.json file to comment out or remove the key-value pair for key heroku-postbuild.

Usage

Open a terminal, navigate to the directory containing the index.js file, then run npm run start to start the app.

Demonstration

View these two videos for a demonstration of the API functionality:

License

This work is licensed under GNU General Publice License v3.0.

Questions

Visit the app's GitHub repo.

To reach me with additional questions, email me at [email protected].

eclectic-carnival's People

Contributors

mjamesd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.