From 1d7561279b2ce3c3bbf399d84c17988762515de7 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Fri, 1 Sep 2023 09:22:02 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=95=20Updated=20local=20dev=20instruct?= =?UTF-8?q?ions=20in=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 037e69e..2e53b70 100644 --- a/README.md +++ b/README.md @@ -3,21 +3,29 @@ This [moleculer-based](https://github.com/moleculerjs/moleculer-web) microservice houses endpoints for the following functions: 1. Local import of a comic library into mongo (currently supports `cbr` and `cbz` files) -2. Metadata extraction from file, `comicinfo.xml` +2. Metadata extraction from file, `comicinfo.xml` 3. Mongo comic object orchestration 4. CRUD operations on `Comic` model 5. Helper utils to help with image metadata extraction, file operations and more. ## Local Development -1. ~~You need `calibre` in your local path. - On `macOS` you can `brew install calibre` and make sure that `ebook-meta` is present on the path~~ Calibre is no longer required as a dependency. Ignore this step. -2. You need `mongo` for the data store. on `macOS` you can use [these instructions](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/) to install it -3. Clone this repo -4. Run `npm i` -5. Assuming you installed mongo correctly, run `MONGO_URI=mongodb://localhost:27017/threetwo npm run dev` to start the service -6. You should see the service spin up and a list of all the endpoints in the terminal -7. The service can be accessed through `http://localhost:3000/api/import/*` +1. You need the following dependencies installed: `mongo`, `elasticsearch` and `redis` +2. Clone this repo +3. Run `npm i` +4. Assuming you installed the dependencies correctly, run: + ``` + COMICS_DIRECTORY= \ + USERDATA_DIRECTORY= \ + REDIS_URI=redis:// \ + ELASTICSEARCH_URI= \ + MONGO_URI=mongodb:///threetwo \ + npm run dev + ``` + to start the service +5. You should see the service spin up and a list of all the endpoints in the terminal +6. The service can be accessed through `http://localhost:3000/api//*` + ## Docker Instructions 1. Build the image using `docker build . -t frishi/threetwo-import-service`. Give it a hot minute.