Code Monkey home page Code Monkey logo

pastebin's Introduction

Memochō

A lightweight pastebin/hastebin alternative with no hard frontend JS dependency. Fork of mkr/bin.

Starting the app

You know the drill:

git clone https://github.com/mojurasu/memocho
cd bin
npm install

Start the app with the ENV variables:

  • BIN_MONGO_CSTRING: your Mongo connection string.
  • BIN_PORT: port on which bin should listen to.
BIN_MONGO_CSTRING=mongodb://localhost:27017/bin-store \
	BIN_PORT=4000 \
	npm start

Running in Docker

Memochō supports running inside Docker through the provided Dockerfile. To build the image:

docker build -t mojurasu/memocho:latest --build-arg PORT=4000 --build-arg MONGO_CSTRING=mongodb://localhost:27017/bin-store .

Then run it as you would any other image:

docker run mojurasu/memocho:latest

Customising Memochō

To customise your self-hosted version of Memochō, you can add these two files to /custom at the root directory:

└─ custom
	├─ style.css
	└─ addon.js

A boring note about JavaScript

I wrote mkr/bin because as much as I love JavaScript, I found the heavy clientside JavaScript dependency in hastebin undesirable. I tried to avoid using clientside JavaScript as much as possible, and mkr/bin will work completely fine on JavaScript disabled browsers. The only things that will not work are keybindings and small things that you can live without. mkr/bin also sends nothing back to my server except the data you want to store. I don't process or store anything else on the server. Settings such as toggling the sidebar is stored on the clientside, so if you clear or if you don't persist your localStorage, you'll see that the sidebar will reappear every time you reload. I will not also accept any PR that creates hard JS dependency for the client. Cheers!

pastebin's People

Contributors

sitischu avatar mkrhere avatar telegramusername avatar msfjarvis avatar pavanjadhaw avatar ceda-ei avatar darvesh 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.