pelias / pelias/api

pelias-api used as lib

Open
#1,502 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
259
Forks
168
Avg merge
6h 15m
Merged PRs (30d)
1

Description

Use-cases

useful for creating a wrapper for pelias api

Attempted Solutions

I want use this module as npm lib like this way:

const app = require('pelias-api/app');

contents of index.js

but now receive this error, I think that could be solved easily

node index.js 
2020-11-09T14:17:54.309Z - warn: [pip] pip service disabled
2020-11-09T14:17:54.310Z - warn: [placeholder] placeholder service disabled
2020-11-09T14:17:54.310Z - warn: [language] language service disabled
2020-11-09T14:17:54.311Z - warn: [interpolation] interpolation service disabled
2020-11-09T14:17:54.311Z - warn: [libpostal] libpostal service disabled
2020-11-09T14:17:54.311Z - warn: [libpostal] libpostal service disabled
fs.js:114
    throw err;
    ^

Error: ENOENT: no such file or directory, open './public/apiDoc.md'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with index.js and inspect how the package resolves public/apiDoc.md when required as pelias-api/app. Check the package entry point and included files, then reproduce the npm-library usage shown in the issue. Done means requiring the app no longer raises the ENOENT error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.