Giter Club home page Giter Club logo

amansinghbhogal / memories-backend Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 161 KB

Backend Code for Memories. Memories is an Web App were individuals can post their daily interesting Anecdotes. It's a social platform where people can enjoy, share, read, like or dislike the stories of their friends and other people from all around the world.

Home Page: https://memories-backend.up.railway.app/

Procfile 0.18% JavaScript 99.82%
api backend express express-js mongodb-atlas nodejs

memories-backend's Introduction

Error 404

Memories

Do you any interesting Anecdote?

Don't wait! Go and post it on: https://memories-a.firebaseapp.com/

About Memories:

Memories is an Web Application where individuals can post their daily interesting Anecdotes. It's a social platform where people can enjoy, share, read, like or dislike the stories of their friends and other people from all around the world.

Backend API: https://memories-api1.herokuapp.com/
Get() Endpoint: https://memories-api1.herokuapp.com/posts
getPostsBySearch() Endpoint: https://memories-api1.herokuapp.com/posts/search?searchQuery=[POST-TITLE-SEARCH]&tags=[TAG1,TAG2]
      eg: https://memories-api1.herokuapp.com/posts/search?searchQuery=none&tags=Tom,Jerry GetPostsByPage() Endpoint: https://memories-api1.herokuapp.com/posts?page=[PAGE_NO]&limit=[NO_OF_POST_NEEDED_PER_PAGE]
      eg: https://memories-api1.herokuapp.com/posts?page=1&limit=5

Steps to Run on Local Machine


Note: You need to have Node.Js installed in your Local Machine if not, first install it from here.

Step 1) Clone AmanSinghBhogal/Memories-Frontend repository.
Step 2) Clone AmanSinghBhogal/Memories-Backend repository.
Step 3) Open Memories-Frontend cloned Directory in Command Prompt and run the following command (It will install all the Dependencies needed to run):
npm i

Step 4) Once all the dependencies are successfully installed, Run the following Command:

npm start

Step 5) Once the above steps are done you should get the message:

You can now view client in the browser.
  Local:            http://localhost:3000 
  webpack compiled successfully

Step 6) Open Browser and go to http://localhost:3000

Step 7) Open Memories-Backend Directory in Command Prompt and run the following command:

npm i

Step 8) Inside the directory create a new file with the name .env and add the following line of code:

CONNECTION__URL = 'mongodb+srv://<Your-User-Name>:<Your-Password>@<Your-MongoDB-Cluster-Name>'

Step 9) Next Run the following Command:

npm start

Step 10) Once the Above steps are completed successfully you should get the message:

Server Running Successfully on port: 5000

Note: At this point the App that you are running on your local machine is using online deployed API of our Backend to change that go into src/api/index.js and change the URL to the http://localhost:5000/posts, this line should look like:

const url = "http://localhost:5000/posts";

instead of:

const url = "https://memories-api1.herokuapp.com/posts";

Thank You


memories-backend's People

Contributors

amansinghbhogal 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.