Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Refactor HTTP API routes #84

Merged
merged 2 commits into from
Mar 13, 2016
Merged

Refactor HTTP API routes #84

merged 2 commits into from
Mar 13, 2016

Conversation

fbaiodias
Copy link
Member

Use dependency injection on routes so that we can start and stop the http-api multiple times without issues on the tests.
Updated jsipfs version to work with the api running and added a test to make sure it works :) Got similar bug to #70

@@ -46,7 +46,7 @@ exports.start = (callback) => {
server.connection({ host: gateway[2], port: gateway[4], labels: 'Gateway' })

// load routes
require('./routes')
require('./routes')(server.select('API'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass the server object completely and let the routes decide where to attach

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diasdavid done!

@fbaiodias fbaiodias force-pushed the refactor/http-api-routes branch from 293765a to 8e0cb1f Compare March 13, 2016 17:22
@fbaiodias
Copy link
Member Author

Added the ipfs version test with the daemon running again, now fixed

@daviddias
Copy link
Member

thank you yet again @xicombd :D :D

daviddias added a commit that referenced this pull request Mar 13, 2016
@daviddias daviddias merged commit d9b4a38 into master Mar 13, 2016
@daviddias daviddias deleted the refactor/http-api-routes branch March 13, 2016 23:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants