Skip to content
koa REST api boilerplate with auth, piped through a tor hidden service
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
config
production
src
test
util
.editorconfig
.eslintrc.json
.gitignore
.npmrc
.travis.yml
LICENSE
README.md
cleanup-images.sh
docker-compose.yml
index.js
install-mongo
package.json

README.md

tor-api

This repository is a boilerplate for building APIs with koa2 and mongodb. It builds on top of this koa-api-boilerplate by adding a tor Docker container and piping the output of koa through a tor .onion hidden service.

Walk-through video: https://www.youtube.com/watch?v=oihYLjKiUQ0

Installation

These directions are geared at Ubuntu 18.04 OS with at least 1GB of RAM, and a non-root user with sudo privileges. Your mileage may vary.

  1. It's always a good idea to add swap space to a new system. I recommend 2GB of swap typically.

  2. Install Docker on the host system. Steps 1 and 2 in this tutorial shows how to install Docker on a Ubuntu system.

  3. Install Docker Compose too. This tutorial shows how to do so on a Ubuntu system.

git clone https://github.com/Permissionless-Software-Foundation/tor-api
cd tor-api
docker-compose build --no-cache
docker-compose up

Usage

  • The .onion address assigned to the tor container is displayed when the container is created. You can view it using docker logs <container ID>. The keys used by tor are stored in the keys folder generated by Docker.

  • Static content like this Gatsby boilerplate can be served by copying the content into the static folder created by Docker. You may need to change the owner to add files to this directory: sudo chown -R <user> static

License

MIT

You can’t perform that action at this time.