Severyn Kozak
a921961c7d
Remove redundant parameter documentation.
...
DOCS.md
-Rather than repeating parameter documentation verbatim for
similar endpoints, simply reference the related endpoints.
10 years ago
Severyn Kozak
435c45562c
rEADME: use inline rather than block code delimiters.
...
DOCS.md
-Replace inline use of ```code``` with `code`, to reduce
character bloat and since that's what the inline delimiters are
meant for.
10 years ago
Severyn Kozak
35467d0c60
package.json: add microtime dependency.
...
Was mistakenly left out earlier and broke a Travis build.
10 years ago
Severyn Kozak
bd2c65a798
Document the pelias-config accessLog option.
...
README.md
-Add a section documenting all of the pelias-config options
recognized by the API.
-Document the `accessLog` option.
10 years ago
Severyn Kozak
51ed1507df
Log the time spent in each elasticsearch query.
10 years ago
Severyn Kozak
0b8220cbf3
Log only once per error.
...
middleware/500.js
-Make one log call per error rather than two, to reduce
clutter/noise.
10 years ago
Diana Shkolnikov
ed0b5113d5
change for loop for foreach
10 years ago
Diana Shkolnikov
0b44ba68c3
forgot to add test to commit
10 years ago
Diana Shkolnikov
31bed0d104
Change /reverse default size to 10
10 years ago
Severyn Kozak
157734b8d6
Emit access-logs via pelias-logger.
...
(app, middleware/access_log).js
-Move the logic that determines whether access logging is
necessary to app.js, since that allows us to maintain the style
of `app.use(require(/* desired middleware module */))` inside
`app.js` without returning a "noop" middleware from
`middleware/access_log.js` in the case that it's unnecessary.
10 years ago
Severyn Kozak
a007af3572
Replace src/logger with pelias-logger.
...
(query, query)/*.js
-Remove unused `../src/logger` `require()`s.
src/logger.js, package.json
-Remove `src/logger` in favor of using `pelias-logger` for all
logging, since it's the Pelias standard.
middleware/500.js
-Replace usage of `src/logger` with pelias-logger.
10 years ago
Diana Shkolnikov
a68c7fae53
Add categories and address properties to result doc
10 years ago
Severyn Kozak
742cebe7c5
Merge branch 'master' into add-logging#8
...
README.md
-Pull in the updated README.
10 years ago
Severyn Kozak
1ce9f1bb05
Shotgun edits to the README.
...
README.md
-Edit a bunch of unrelated things... sorry. ;)
-Condense the documentation of different `npm run`nable commands
to one list.
-Remove the note about Travis, since that applies to virtually
all the Pelias repos and is documented elsewhere.
-Point the API docs hyperlink to `DOCS.md`.
10 years ago
Severyn Kozak
877e1e90a5
Add an access log middleware.
...
middleware/access_log.js, package.json
-Add middleware for printing out access logs.
-Add necessary dependencies.
10 years ago
Severyn Kozak
d0dd39257b
package.json: remove `npm run coverage` from `npm test`.
...
There isn't any point in regenerating coverage reports after every test
run.
10 years ago
Severyn Kozak
98a0a33256
Merge branch 'master' into boost-exact-matches#5
...
Pull in the latest of master.
Conflicts:
query/reverse.js
query/sort.js
10 years ago
Diana Shkolnikov
e5a1d12ced
Merge pull request #117 from pelias/better-bbox-desc
...
Better way of describing bbox param
10 years ago
Severyn Kozak
f27df8b5c5
Return error message if string.
...
middleware/500.js
-cf1a483 changed the middleware to return an opaque error
message rather than the error object itself, in case it contains
sensitive information. The problem is that some sanitizers
return a helpful error message (intended to be seen by users) as
a string. Add a conditional to only return the ambiguous,
catchall error message when a non-string `err` object is
received -- this will likely be a stack trace, or something.
10 years ago
Diana Shkolnikov
e3cdda9778
ugh another comment fix
10 years ago
Diana Shkolnikov
6ae1a4f7df
fix comments and tests
10 years ago
Severyn Kozak
f72ed2a6bd
Merge pull request #106 from pelias/category-scoring
...
category scoring [WIP]
10 years ago
Diana Shkolnikov
7c81c56cf3
Fix bbox comment
10 years ago
Diana Shkolnikov
8ac17d0cb2
Fix bbox parsing
10 years ago
Diana Shkolnikov
aeb7e3b0e7
Merge branch 'master' into better-bbox-desc
10 years ago
Severyn Kozak
b70ebb1d95
helper/category_weights.js: add a documentation comment.
10 years ago
Severyn Kozak
da61a713be
Increase weights for airports.
...
helper/category_weights.js
-This should now make a record like "Newark Airport" appear
above, say, "Newark Airport Station".
10 years ago
Diana Shkolnikov
d8ac05ea65
Merge pull request #103 from pelias/address-details
...
Detail Param
10 years ago
Diana Shkolnikov
8c22f33dc7
Add details sanitizer to suggest/coarse
10 years ago
Diana Shkolnikov
3fef192c68
Update doc
10 years ago
Harish Krishna
30466377ab
bbox string is a standard way of passing around bbox description over a web req. Its important we document it well.
10 years ago
Diana Shkolnikov
a728bf53b5
Merge branch 'master' into address-details
10 years ago
Diana Shkolnikov
e146829618
Merge pull request #115 from pelias/reverse-categories
...
Reverse categories
10 years ago
Harish Krishna
e1ddcbb93f
Merge pull request #116 from pelias/runtime-error-reporting#114
...
Resolve #114 : report runtime errors.
10 years ago
Severyn Kozak
cf1a483ede
Don't report full errors in API results.
...
middleware/500.js
-Return a generic error message rather than stringified error
object in API results.
10 years ago
Severyn Kozak
17bb6db6e5
Resolve #114 : report runtime errors.
...
middleware/500.js
-Add code to the 500 catchall middleware to report errors to
stdout/stderr.
-Also, stringify the error via `.toString()` before passing it
to `res.json()`, since otherwise an empty object appears to be
returned.
10 years ago
Diana Shkolnikov
0d07c38b06
add to README
10 years ago
Diana Shkolnikov
4d0c23e742
remove code-climate hooks
10 years ago
Diana Shkolnikov
5101d802ab
remove code-climate hooks
10 years ago
Diana Shkolnikov
7b5a2fafb9
Change query to use `terms` and add code coverage stats
10 years ago
Diana Shkolnikov
1bf0fcd298
Add categories param to /reverse
10 years ago
Diana Shkolnikov
ffc19457a4
Merge pull request #108 from pelias/better-index-page
...
Better API index page
10 years ago
Diana Shkolnikov
45ba29cc54
Add categories param to /reverse
10 years ago
Severyn Kozak
29838e5b8c
Move code that needs to run only once.
...
controller/index.js
-Move all of the index page HTML "initialization" code that only
needs to run once, like markdown compilation and `style`
prepending, out of the request handler.
10 years ago
Diana Shkolnikov
99ee2d95a3
Change to readFileSync and update test to use proxyquire
10 years ago
Diana Shkolnikov
4f1b75ce94
Fix test name
10 years ago
Diana Shkolnikov
1d45b20268
Load markdown file into memory and check if client requested html
10 years ago
Severyn Kozak
5b389833bd
Test a sort() call with a params object without an input.
...
See https://github.com/pelias/api/pull/113/files#r28972709 .
10 years ago
Severyn Kozak
f477db140a
Pass params to sort(), addressing https://github.com/pelias/api/pull/113#discussion_r28972496 .
10 years ago
Severyn Kozak
f9670bf7e4
Use is-object, addressing https://github.com/pelias/api/pull/113/files#r28972145 .
10 years ago