Coder Social home page Coder Social logo

bifrost's People

Contributors

emmanuelgeoffray avatar gabrielstuff avatar hugohil avatar oleksiireshetnik avatar tanaki avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

philip-kazakov

bifrost's Issues

[nedb-migration-feature] request fails

Some post requests that works on the master branch seems to fail on nedb-migration-feature with no error, just proxy.js - fail - but saved

the request was made in meteor like this:

request.post({url: url, formData: formData}, function optionalCallback (err, httpResponse, body) {...})

Bifrost should implement mdns discovery

At startup bifrost should declare it's service and broadcast a bifrost service with port information.
This would allow other apps to seamlessly connect to bifrost if needed and post the content to save it

npm test fail

running npm test

proxy.js - launchRequest:  http://46.101.182.71/api/item/
/Volumes/Macintosh HD/Users/gabrielstuff/Sources/node/bifrost/node_modules/async/dist/async.js:331
          length = nativeMax(args.length - start, 0),
                   ^

RangeError: Maximum call stack size exceeded
    at max (native)
    at /Volumes/Macintosh HD/Users/gabrielstuff/Sources/node/bifrost/node_modules/async/dist/async.js:331:20
    at /Volumes/Macintosh HD/Users/gabrielstuff/Sources/node/bifrost/node_modules/async/dist/async.js:840:18
    at /Volumes/Macintosh HD/Users/gabrielstuff/Sources/node/bifrost/app/queue.js:42:9
    at /Volumes/Macintosh HD/Users/gabrielstuff/Sources/node/bifrost/node_modules/async/dist/async.js:3781:7
    at Object.q.process (/Volumes/Macintosh HD/Users/gabrielstuff/Sources/node/bifrost/node_modules/async/dist/async.js:2127:19)
    at /Volumes/Macintosh HD/Users/gabrielstuff/Sources/node/bifrost/node_modules/async/dist/async.js:2076:17
    at /Volumes/Macintosh HD/Users/gabrielstuff/Sources/node/bifrost/node_modules/async/dist/async.js:338:29
    at /Volumes/Macintosh HD/Users/gabrielstuff/Sources/node/bifrost/node_modules/async/dist/async.js:840:18
    at /Volumes/Macintosh HD/Users/gabrielstuff/Sources/node/bifrost/app/queue.js:42:9

npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/gabrielstuff/.nvm/versions/v5.12.0/bin/node" "/Users/gabrielstuff/.nvm/versions/v5.12.0/bin/npm" "start"
npm ERR! node v5.12.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node $NODE_DEBUG_OPTION app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node $NODE_DEBUG_OPTION app.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bifrost package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node $NODE_DEBUG_OPTION app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bifrost
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bifrost
npm ERR! There is likely additional logging output above.

unexpected token d

when sending a base64 image like this: $http.post(url, base64) bifrost shows unexpected token d

hotfix was to use $http.post(url, {"formData": data})

Default value should follow a common pattern

Instead of :
if (!postData.timestamp) postData.timestamp = timestamp
We should :
postData.timestamp = timestamp || new Date()

The same principle should apply for every field.

request is sent twice

bifrost 0.0.1 is running on http://192.168.8.102:3002
queue.js - clear timer
proxy.js - post from proxy
proxy.js - launchRequest:  http://10.196.60.41:3000/api/storeMedia
proxy.js - fail - but saved
proxy.js - post from proxy - queue
proxy.js - launchRequest:  http://10.196.60.41:3000/api/storeMedia
queue.js: all requests have been processed
proxy.js - post from proxy - queue
proxy.js - launchRequest:  http://10.196.60.41:3000/api/storeMedia
queue.js: all requests have been processed
proxy.js - success + deleted
proxy.js - success + deleted
queue.js - clear timer

and I can see the image twice on the server

Add relevant test

The test folder should include :

  • a server script that accept POST file
  • a server script that accept base64 file
  • a server script with all form type

A test script for each POST type
A test script that shows that the response from the server is well forwarded
A test script that shows that if the test server fail, bifrost return that it saved it

Don't handle queue like that

The queue must be handled one file at a time and not every file at once.
On your interval, just take one file, then another :)

Add a config.example.json file

In order to avoid to replace custom config setup, add a config.example.json to make sure people are up to date.

Add the relevant info in readme : cp config/config.example.json config/config.json

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.