From 823b00acc394234085bccd0aa1c252e043f0e756 Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Sat, 16 Oct 2021 10:39:47 +0200 Subject: [PATCH] Make it possible to run as global package --- index.mjs | 3 +++ package.json | 3 +++ 2 files changed, 6 insertions(+) mode change 100644 => 100755 index.mjs diff --git a/index.mjs b/index.mjs old mode 100644 new mode 100755 index 3a24d0b..c7ccce4 --- a/index.mjs +++ b/index.mjs @@ -1,3 +1,5 @@ +#!/usr/bin/node + import Koa from "koa"; import Router from "@koa/router"; import axios from "axios"; @@ -15,3 +17,4 @@ const app = new Koa(); app.use(router.routes()); app.listen(8383); +console.log("Listening on port 8383"); diff --git a/package.json b/package.json index 3dec41c..3368f28 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,9 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, + "bin": { + "opaque-proxy": "./index.mjs" + }, "author": "", "license": "ISC", "dependencies": {