Giter Site home page Giter Site logo

paste-bin's Introduction

Paste - A simple pastebin clone

This is a simple pastebin clone built with Next.js and MongoDB.

This is an educational project to learn Next.js and MongoDB. It is not intended to be used in production.

Deploy with Vercel

Pastebin

How it works

This application leverages Next.js and MongoDB to seamlessly store and retrieve user-submitted code snippets. Snippets are securely stored in a MongoDB database and can be conveniently accessed through a unique URL generated upon submission, with Next.js efficiently managing the MongoDB connection.

Also supports Dark/Light mode.

Running Locally

Cloning the repository the local machine.

git clone https://github.com/turing0/paste-bin.git

Creating a account on MongoDB Atlass to get the connection string.

  1. Create a free account on MongoDB Atlass.
  2. Create a new cluster.
  3. Create a new database user.
  4. Get the connection string.

Setting up the environment variables.

Create a file named .env.local in the root directory of the project. Add the following environment variables to the file.

SECRET_KEY= # A random string used for encryption.
BASE_URL= # The URL of the app. ex: https://paste.laphel.com/
MONGODB_URI= # The connection string to your MongoDB instance.

Installing the dependencies.

npm install

Running the application.

Then, run the application in the command line and it will be available at http://localhost:3000.

npm run dev

One-Click Deploy

Deploy the example using Vercel:

Deploy with Vercel

License

This repo is MIT licensed.

paste-bin's People

Contributors

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