Coder Social home page Coder Social logo

shuxiaokai / paste-library-mern Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deepak-kharah/paste-library-mern

0.0 0.0 0.0 2.41 MB

Paste library is a web-based paste bin like service that allows users to paste and share text. I made this app to explore the MERN stack. During the development, I learned how to generate and map a short URL to a set of data with the least collision. The aim was to achieve maximum convenience and privacy. So, the metric used was to complete the entire process within just two clicks.

Home Page: https://pastelibrary.tk

License: MIT License

HTML 1.14% JavaScript 93.10% CSS 5.76%

paste-library-mern's Introduction

Paste Library

GitHub license project status Website

Paste library is a web-based paste bin like service that allows users to paste and share text. I made this app to explore the MERN stack. During the development, I learned how to generate and map a short URL to a set of data with the least collision. The aim was to achieve maximum convenience and privacy. So, the metric used was to complete the entire process within just two clicks.

Table of content

Installation

  1. Fork the repository, then clone from your repository.

  2. Create MongoDB server with the username super (!Important) from MongoDB atlas.

  3. Make sure you have node.js installed on your system. Download node.js if required.

    # to check if node.js exist
    $ node -v
  4. Go to the cloned paste-library-mern folder in your local machine and open terminal.

  5. Enter following command to install dependencies for both backend and frontend

    $ npm install
    $ cd client # paste-library-mern/client
    $ npm install
    $ cd .. # paste-library-mern/
  6. Make a copy of .env.example and rename it .env in the same directory.

  7. Replace .env file values except for DEFAULT_USER_ID.

  8. Run following commands in the terminal to run the web-application.

    # first terminal
    # paste-library-mern/
    $ npm start
    # second terminal
    $ cd client # paste-library-mern/client
    $ npm start

    If successful you'll see this msg in the two terminals

    Server started on port 5000
    MongoDB connected
    Compiled successfully!
    
    You can now view client in the browser.
    
    Local:            http://localhost:3000
    On Your Network:  http://192.168.xxx.xxx:3000
    
    Note that the development build is not optimized.
    To create a production build, use npm run build.
  9. Create new default anonymous user by going to url localhost:3000/register with any credentials you like. This will be used for all dump creation for logged out user.

  10. Go to your Atlas dashboard and click on collections now find users database and copy _id. Now, paste this in .env > DEFAULT_USER_ID.

    Note: copy only the string inside ObjectId()

Usage

Go to localhost:3000/ to view the project running and use it like any other web-application.

first look

Tech stack

Front end

  • HTML
  • CSS
  • ReactJS

Backend

  • NodeJS
  • ExpressJS

Database

  • MongoDB

Server

  • Heroku

Deployment

This web-application is deployed using Heroku under the domain pastelibrary.tk

Screenshots

screenshot of login page

screenshot of login page

screenshot of login page

screenshot of login page

License

This web-application is licensed under MIT. For more info refer to LICENSE file in the root directory.

paste-library-mern's People

Contributors

deepak-kharah avatar dependabot[bot] 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.