https://github.com/thisislawatts/snyk-exercise
https://github.com/thisislawatts/snyk-exercise
front-end full-stack
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thisislawatts/snyk-exercise
- Owner: thisislawatts
- Created: 2017-07-13T08:05:04.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-15T17:18:39.000Z (almost 9 years ago)
- Last Synced: 2026-01-03T17:13:01.775Z (6 months ago)
- Topics: front-end, full-stack
- Language: JavaScript
- Homepage:
- Size: 2.47 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
npm Inspector
===
Repository containing two apps, __API__ and __Web__ for querying the [npm registry](https://registry.npmjs.org). __Web__ serves the results from the __API__.

Getting Started
---
* Clone the repository `git clone git@github.com:thisislawatts/snyk-exercise.git`
* Open the `web` and `app` directories in seperate terminal and run `npm install` to install all of the dependencies for each of these.
* Using the `npm run start` command in each of these directories will start a server process.
API
---
Responsible for returning and formatting the data for the UI. This application runs on [Koa](https://github.com/koajs/koa) and requires NodeJS 8+.
### Endpoint
/package/{name}/{version}
```
{
"name": ""
"version": "",
"dependencies": [
{
"name": "",
"version": "",
"dependencies": ""
}
],
"devDependecies: [
{
"name": "",
"version": "",
"dependencies": ""
}
]
}
```
__Todo__
* Add tests/
* Improve error handling for invalid responses eg. 404
* Add caching for [registry.npmjs.org](https://registry.npmjs.org) queries, potentially Redis over Couch DB setup.
* With caching in place increase depth to which dependencies are resolved.
Web
---
🌈 Beautiful front end. This runs on [Express](https://expressjs.com) and NodeJS 8.
* [Homepage](http://localhost:3001/)
* [Individual Package](http://localhost:3001/package/snyk)
__Todo__
* Add tests
* Server/client side validation of search queries
* Add loading indicator for loading items when
* Improve UI when expanding tree, the primary action is for users to expand tree rather than