• JavaScript 75.4%
  • CSS 20.1%
  • Dockerfile 3.3%
  • Nix 1.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-03-10 02:15:24 +01:00
.forgejo/workflows Switch to custom build image 2026-03-10 02:15:24 +01:00
.vscode [docs] Added README and other changes 2018-09-23 03:18:08 +05:30
middleware Code style 2020-02-27 23:24:51 +01:00
model Code style 2020-02-27 23:24:51 +01:00
public Try to fix #MO-3, again 2020-02-29 16:26:56 +01:00
render Fix highlight being off by one 2023-08-14 22:26:12 +02:00
routes Code style 2020-02-27 23:24:51 +01:00
.env.example Support configuring host 2025-08-24 22:18:26 +02:00
.gitignore Ignore package-lock 2020-02-28 01:03:33 +01:00
app.js Support configuring host 2025-08-24 22:18:26 +02:00
docker-compose.yml Update compose file 2026-03-08 20:12:29 +01:00
Dockerfile Support configuring host 2025-08-24 22:18:26 +02:00
LICENSE Update license and package.json 2026-03-08 17:56:53 +01:00
package.json Version v1.1.0 2026-03-08 17:57:10 +01:00
README.md Update README 2025-08-24 22:25:23 +02:00
shell.nix Add shell.nix 2020-02-27 23:25:51 +01:00
shrinkwrap.yaml [dependency] Added highlight.js 2018-09-23 06:14:34 +05:30

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

Docker Compose

The compose file uses the .env file for the build arguments so it can be built like this:

docker compose --env-file .env up --build -d

You'll need to set the mongodb string to the IP of the container, you can get this from docker network inspect mongodb

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!