Giter VIP home page Giter VIP logo

meatier's Issues

Unable to start

Hi

I love the idea of your project and am looking to move away from Meteor for my next project so have cloned your repo and npm installed...etc... and have tried to npm start and am receiving the following error (it just keeps recurring in a never ending loop).

Origin: Worker (PID 10018)
   [Error] Error: Cannot find module '../../serverBuild/app'
    at Function.Module._resolveFilename (module.js:327:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:355:17)
    at require (internal/module.js:13:17)
    at Object.<anonymous> (createSSR.js:17:34)
    at Module._compile (module.js:399:26)
    at loader (/Users/jasonweise/git/meatier/node_modules/babel-register/lib/node.js:130:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/jasonweise/git/meatier/node_modules/babel-register/lib/node.js:140:7)
    at Module.load (module.js:345:32)
    at Function.Module._load (module.js:302:12)
1450327170035 - Worker 0 exited - Exit code: 0

One thing of note is I had to revert to webpack v1.12.9 in the package.json for npm install to even finish without an error.

Environment..
Node: 5.2
OS: OSX El Capitan

Don't seem to have any dramas with any other frameworks I am evaluating so I figure it is something in your current version considering it is so young.

Any ideas on the above .. thanks in advance.

Front End

Great stuff and I think you are taking a interesting path. Wondering however why React ? I got the feeling we need something fully ES6/7 and not another propitiatory (.jsx) format. Thought about Aurelia.io as excellent Front End from the original Angular 1.0 (but not 2.0) Developer. They are fully standard JS compliant.

Tutorial needed

@mattkrick Hi this huge effort man thank you for that ,but it's too many frameworks and tools here it will be much clearer if there's any blog post or step by step tutorial to guide us through.

Client cache options

Client caching is painful right now.

Requirements:

  • Uses redux store
  • Offers offline-first experience

Nice-to-haves:

  • webworkers
  • Uses graphQL schemas

Problems:

  • How does the store look? Most graphQL solutions (Relay, Adrenaline, Lokka) normalize data according to the graphQL schema. This is great unless you have subscriptions via websockets, then it doesn't know where to put the data. Something like minimongo that looks like the database seems easier, but writing code to covert graphQL schemas back into database-normalized wouldn't be great
  • The current solution works well & allows for a ton of flexibility, but complex graphQL queries would have to be digested & dispatch n+1 actions where n is the number of tables the queries touches. This isn't the end of the world, but makes for large amounts of reducer boilerplate.

Poor Readme

Meteor is awesome, but his future is not clear
It'll be great, if you will write something like docs.meteor.com or guide.meteor.com
Thank you

EPEERINVALID on fresh clone and npm install

Just cloned and tried installing, but I get some EPEERINVALID errors. The first has to do with the history package, that was buggy in version 1.16.x, so you naturally set default to 1.13.x, but now the newer version of react-router requires version 1.17.x. Easy fix.

But the second EPEERINVALID error has to do with your redux-socket-cluster and socketcluster-client. Since I'm not familiar with these packages I don't know what's going on.

Cheers!

Deploying a Meatier application

How would one go about deploying a production version of a Meatier application?

Does socket cluster need to run on a separate server? Can it be configured?
K, got confused because I saw it IS possible.

What about RethinkDB? The config seems to be hardcoded to localhost
Duplicate of #52
See progress being made with the azk branch linked to in that thread.

I made a landing page with meatier and am not really sure how to put it up now!

Roadmap and future plans

What are your plans for this project? It seems like it has a lot of potential.

Are you interested in turning it into something more formal (maybe like MEAN.JS) and building a community around it?

Any roadmap?

RPC functionality

Have you considered adding RPC functionality, similar to Meteor methods?

Also, have you looked at deepstream.io as a possible alternative to SocketCluster? It appears to include an RPC mechanism as well as integration with RethinkDB.

Production mode not working

Am testing this beast out and development mode works (npm start) but if testing in production mode (npm run prod) I receive the following error:

ReferenceError: System is not defined
    at createSSR (createSSR.js:24:24)
    at Layer.handle [as handle_request] (/Users/jasonweise/git/meatier/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/jasonweise/git/meatier/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/Users/jasonweise/git/meatier/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/Users/jasonweise/git/meatier/node_modules/express/lib/router/layer.js:95:5)
    at /Users/jasonweise/git/meatier/node_modules/express/lib/router/index.js:277:22
    at param (/Users/jasonweise/git/meatier/node_modules/express/lib/router/index.js:349:14)
    at param (/Users/jasonweise/git/meatier/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/Users/jasonweise/git/meatier/node_modules/express/lib/router/index.js:410:3)
    at next (/Users/jasonweise/git/meatier/node_modules/express/lib/router/index.js:271:10)
    at worker.js:43:7
    at Layer.handle [as handle_request] (/Users/jasonweise/git/meatier/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/jasonweise/git/meatier/node_modules/express/lib/router/index.js:312:13)
    at /Users/jasonweise/git/meatier/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/jasonweise/git/meatier/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/jasonweise/git/meatier/node_modules/express/lib/router/index.js:271:10)

React Native?

Hi, I'm new to React (Native) and Redux. I'm starting an app that requires native components so React Native it is. Just asking here before I dive in, that with meatier's choice of stack, would using React Native instead of React proper a problem?

Thanks for your thoughts.

How to get in touch?

Hey, Matt! Trying to find a good way to get in touch but can't find an email address for you. Could you share an email here or shoot me an email personally ([email protected])?

First time browsing to localhost after npm start

Tried this every which way I know and I keep receiving this error when I browse to localhost:3000 after following the steps. I am sure it is something stupid, just not sure what exactly. This is showing in the second terminal window where I used "npm start"

ERROR in Entry module not found: Error: Cannot resolve module 'react-json-tree/lib/index.js' in /Users/thom/Desktop/meatier/src

ERROR in Entry module not found: Error: Cannot resolve module 'react-dock/lib/index.js' in /Users/thom/Desktop/meatier/src

Error: nData server at socket path

Below is the error message right after the installation when I run npm start. Any idea why this happens?

[email protected] start /Users/puruzio/_dev/meteor/meatier/meatier
NODE_ENV=development node ./src/server/server.babel.js

[Busy] Launching SocketCluster
/Users/puruzio/_dev/meteor/meatier/meatier/src/server/init.js:3
only(filename) {
^
SyntaxError: Unexpected token (
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/Users/puruzio/_dev/meteor/meatier/meatier/node_modules/socketcluster/node_modules/iocluster/node_modules/ndata/server.js:20:23)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
1450568376974 - Origin: IOCluster
[Error] Error: nData server at socket path /var/folders/sx/sth4f7vn5sq0w0mqtpxx1th80000gn/T//socketcluster/Meatier_e1839c24b0/b0 exited
at EventEmitter. (/Users/puruzio/_dev/meteor/meatier/meatier/node_modules/socketcluster/node_modules/iocluster/index.js:353:28)
at EventEmitter.emit (events.js:110:17)
at ChildProcess. (/Users/puruzio/_dev/meteor/meatier/meatier/node_modules/socketcluster/node_modules/iocluster/node_modules/ndata/index.js:55:10)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
/Users/puruzio/_dev/meteor/meatier/meatier/src/server/init.js:3

Add oauth login for facebook & google

Logging in with oauth (google/facebook) should return an email address & profile pic. The token & and pic url should be stored in an accounts objects nested in the user document. Since this is pure JWTs, it may be easier to do this without using passport.js. If someone has experience with oauth & JWTs, let me know!

Unable to install

I get the following error after running npm install:

1431 error Darwin 15.0.0
1432 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
1433 error node v4.2.3
1434 error npm  v2.14.7
1435 error code EPEERINVALID
1436 error peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
1436 error peerinvalid Peer [email protected] wants webpack@^1.0.0
1436 error peerinvalid Peer [email protected] wants webpack@^1.9.11
1436 error peerinvalid Peer [email protected] wants webpack@>=1.0.0 <3
1437 verbose exit [ 1, true ]

Any ideas why?

Add SSR back in

the root page should be served via SSR. Unfortunately, this won't showcase how to send redux state since the kanban app requires a login. Maybe add a second small app that has a table & is available to everyone to show how to fulfill state on the server & send it down over the wire.

RSQL error occurs

Hello. I'm new of meatier.
I installed meatier without any modifications.
When I use khanban, it throws below:

[Error] ReqlCompileError: Unrecognized optional argument `include_initial` in:
[3] r.table("lanes").filter(r.row("isPrivate").eq(false).or(r.row("userId").eq("652e9cf0-a21b-44af-9aab-e056ce2a340d")))
[3]     .pluck(["id", "userId", "title"]).changes({
[3]                                               ^
[3]         includeInitial: true
[3]         ^^^^^^^^^^^^^^^^^^^^
[3]     })

I think some rethink db code does not work, perhaps?

Failed propType: Required prop `children` was not specified in `AppContainer`.

Strangely, these errors happen only on Safari, but not on Chrome. As a result, the login form doesn't appear on Safari. Any clue?

[Error] Warning: Failed propType: Required prop children was not specified in AppContainer. Check the render method of TokenizedComp.
warning
checkPropTypes
validatePropTypes
createElement
render
tryRender
_renderValidatedComponentWithoutOwnerOrContext
_renderValidatedComponent
ReactCompositeComponent__renderValidatedComponent
_updateRenderedComponent
_performComponentUpdate
updateComponent
ReactCompositeComponent_updateComponent
receiveComponent
receiveComponent
_updateRenderedComponent
_performComponentUpdate
updateComponent
ReactCompositeComponent_updateComponent
receiveComponent
receiveComponent
_updateRenderedComponent
_performComponentUpdate
updateComponent
ReactCompositeComponent_updateComponent
receiveComponent
receiveComponent
_updateRenderedComponent
_performComponentUpdate
updateComponent
ReactCompositeComponent_updateComponent
performUpdateIfNecessary
performUpdateIfNecessary
runBatchedUpdates
perform
perform
perform
flushBatchedUpdates
ReactUpdates_flushBatchedUpdates
(anonymous function)
closeAll
perform
batchedUpdates
enqueueUpdate
enqueueUpdate
enqueueSetState
setState
(anonymous function)
(anonymous function)
(anonymous function)
done
(anonymous function)
getComponentsForRoute
(anonymous function)
(anonymous function)
forEach
mapAsync
getComponents
(anonymous function)
done
next
(anonymous function)
(anonymous function)
(anonymous function)
(anonymous function)
next
loopAsync
runEnterHooks
finishMatch
(anonymous function)
done
(anonymous function)
(anonymous function)
done
(anonymous function)
(anonymous function)
(anonymous function)
_callee$
tryCatch
invoke
(anonymous function)
step
(anonymous function)
promiseReactionJob
[Error] Warning: Failed propType: Required prop children was not specified in App. Check the render method of AppContainer.
warning
checkPropTypes
validatePropTypes
createElement
render
_renderValidatedComponentWithoutOwnerOrContext
_renderValidatedComponent
ReactCompositeComponent__renderValidatedComponent
_updateRenderedComponent
_performComponentUpdate
updateComponent
ReactCompositeComponent_updateComponent
receiveComponent
receiveComponent
_updateRenderedComponent
_performComponentUpdate
updateComponent
ReactCompositeComponent_updateComponent
receiveComponent
receiveComponent
_updateRenderedComponent
_performComponentUpdate
updateComponent
ReactCompositeComponent_updateComponent
receiveComponent
receiveComponent
_updateRenderedComponent
_performComponentUpdate
updateComponent
ReactCompositeComponent_updateComponent
receiveComponent
receiveComponent
_updateRenderedComponent
_performComponentUpdate
updateComponent
ReactCompositeComponent_updateComponent
performUpdateIfNecessary
performUpdateIfNecessary
runBatchedUpdates
perform
perform
perform
flushBatchedUpdates
ReactUpdates_flushBatchedUpdates
(anonymous function)
closeAll
perform
batchedUpdates
enqueueUpdate
enqueueUpdate
enqueueSetState
setState
(anonymous function)
(anonymous function)
(anonymous function)
done
(anonymous function)
getComponentsForRoute
(anonymous function)
(anonymous function)
forEach
mapAsync
getComponents
(anonymous function)
done
next
(anonymous function)
(anonymous function)
(anonymous function)
(anonymous function)
next
loopAsync
runEnterHooks
finishMatch
(anonymous function)
done
(anonymous function)
(anonymous function)
done
(anonymous function)
(anonymous function)
(anonymous function)
_callee$
tryCatch
invoke
(anonymous function)
step
(anonymous function)
promiseReactionJob

npm run build fails

Hi,

I just stumbled over this great project and I thought to give it a try. Must admit, that I'm quite new to some of this stuff. So I got this newb issue.

I have a fresh node/npm installation on my Mac (node 5.3 and npm 3.3.12). I followed the instructions but when I run the npm run build command, I get the error below. Note, I changed manually in package.json the line "redux-socket-cluster": "^0.5.0", to "redux-socket-cluster": "^0.4.0",. I had an error that a version 0.5.0 - 0.6.0 cannot be found. Isn't 0.4.0 the latest? After changing that I could proceed but I got the error here:
....
[0] WARNING in ..//bindings/bindings.js
[0] Critical dependencies:
[0] 76:22-40 the request of a dependency is an expression
[0] 76:43-53 the request of a dependency is an expression
[0] @ ../
/bindings/bindings.js 76:22-40 76:43-53
[0]
[0] ERROR in ..//socketcluster-client//ws/lib/WebSocketServer.js
[0] Module not found: Error: Cannot resolve module 'tls' in /Users/i13/dev/meatier/node_modules/socketcluster-client/node_modules/ws/lib
[0] @ ..//socketcluster-client//ws/lib/WebSocketServer.js 15:10-24
[0]
[0] ERROR in ..//options/lib/options.js
[0] Module not found: Error: Cannot resolve module 'fs' in /Users/i13/dev/meatier/node_modules/options/lib
[0] @ ../
/options/lib/options.js 6:9-22
[0]
[0] ERROR in ..//bindings/bindings.js
[0] Module not found: Error: Cannot resolve module 'fs' in /Users/i13/dev/meatier/node_modules/bindings
[0] @ ../
/bindings/bindings.js 6:9-22
[0]
[0] npm
[0]
[0] ERR!
[0] Darwin 15.2.0
[0] npm ERR! argv
[0] "/usr/local/Cellar/node/5.3.0/bin/node" "/usr/local/bin/npm" "run" "build:client"
[0] npm ERR! node
[0] v5.3.0
[0] npm ERR! npm v3.3.12
[0] npm
[0] ERR! code ELIFECYCLE
[0] npm ERR! [email protected] build:client: NODE_ENV=production webpack --colors --config ./webpack/prod.babel.js
[0] npm ERR!
[0] Exit status 2
[0] npm ERR!
[0] npm
[0] ERR! Failed at the [email protected] build:client script 'NODE_ENV=production webpack --colors --config ./webpack/prod.babel.js'.
[0] npm
[0] ERR! Make sure you have the latest version of node.js and npm installed.
[0] npm
[0] ERR! If you do, this is most likely a problem with the meatier package,
[0] npm
[0] ERR! not with npm itself.
[0] npm ERR! Tell the author that this fails on your system:
[0] npm ERR! NODE_ENV=production webpack --colors --config ./webpack/prod.babel.js
[0] npm ERR! You can get their info via:
[0] npm ERR! npm owner ls meatier
[0] npm ERR! There is likely additional logging output above.
[0]
[0] npm
[0] ERR! Please include the following file with any support request:
[0] npm ERR!
[0] /Users/i13/dev/meatier/npm-debug.log
[0] npm run build:client exited with code 1

npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/Cellar/node/5.3.0/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v5.3.0
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: rimraf build && concurrent "npm run build:client" "npm run build:server"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'rimraf build && concurrent "npm run build:client" "npm run build:server"'.
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 meatier package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! rimraf build && concurrent "npm run build:client" "npm run build:server"
npm ERR! You can get their info via:
npm ERR! npm owner ls meatier
npm ERR! There is likely additional logging output above.

Am I missing something?

Thanks a lot.

universal>components>App>App.js

import injectTapeEventPlugin from 'react-tap-event-plugin';

Not sure this is the correct place to do this but...
src>server>database>models>googleStrategy.js line 25

          picutre: profile.picture,

Error keeps repeating on the server

I get this error

1450915130862 - Origin: Worker (PID 99729)
   [Error] Error: bind EADDRINUSE null:3000
    at Object.exports._errnoException (util.js:837:11)
    at exports._exceptionWithHostPort (util.js:860:20)
    at cb (net.js:1296:16)
    at shared (cluster.js:582:5)
    at Worker.<anonymous> (cluster.js:556:9)
    at process.<anonymous> (cluster.js:710:8)
    at emitTwo (events.js:92:20)
    at process.emit (events.js:172:7)
    at handleMessage (internal/child_process.js:685:10)
    at internal/child_process.js:496:7
    at process.handleConversion.net.Native.got (internal/child_process.js:43:7)
    at process.<anonymous> (internal/child_process.js:495:13)
    at emitTwo (events.js:92:20)
    at process.emit (events.js:172:7)
    at handleMessage (internal/child_process.js:685:10)
    at Pipe.channel.onread (internal/child_process.js:438:11)

over and over on the server end.

Failed to install

Hi interesting project but failed to install. Here is the error
failed at this step
rimraf build && concurrent "npm run build:client" "npm run build:server

 ERROR in Entry module not found: Error: Cannot resolve module 'universal/modules/kanban/containers/Kanban/KanbanContainer.js' in /home/bob/code/meatier/src
[0] 
[0] ERROR in ./universal/redux/makeReducer.js
[0] Module not found: Error: Cannot resolve 'file' or 'directory' ../modules/auth/ducks/auth in /home/bob/code/meatier/src/universal/redux
[0]  @ ./universal/redux/makeReducer.js 17:12-49
[0] 
[0] ERROR in ./universal/routes/kanban.js
[0] Module not found: Error: Cannot resolve module 'universal/modules/kanban/containers/Kanban/KanbanContainer' in /home/bob/code/meatier/src/universal/routes
[0]  @ ./universal/routes/kanban.js 68:32-107
[0] 
[0] ERROR in ./universal/routes/kanban.js
[0] Module not found: Error: Cannot resolve module 'universal/modules/kanban/ducks/lanes' in /home/bob/code/meatier/src/universal/routes
[0]  @ ./universal/routes/kanban.js 68:174-227
[0] 
[0] ERROR in ./universal/routes/kanban.js
[0] Module not found: Error: Cannot resolve module 'universal/modules/kanban/ducks/notes' in /home/bob/code/meatier/src/universal/routes
[0]  @ ./universal/routes/kanban.js 68:240-293
[0] 
[0] ERROR in ./universal/routes/graphql.js
[0] Module not found: Error: Cannot resolve module 'universal/modules/admin/components/Graphql/Graphql' in /home/bob/code/meatier/src/universal/routes
[0]  @ ./universal/routes/graphql.js 21:21-88
[0] 
[0] ERROR in ./universal/routes/login.js
[0] Module not found: Error: Cannot resolve module 'universal/modules/auth/containers/auth/AuthContainer' in /home/bob/code/meatier/src/universal/routes
[0]  @ ./universal/routes/login.js 26:23-92
[0] 
[0] ERROR in ./universal/routes/signup.js
[0] Module not found: Error: Cannot resolve module 'universal/modules/auth/containers/auth/AuthContainer' in /home/bob/code/meatier/src/universal/routes
[0]  @ ./universal/routes/signup.js 25:23-92
[0] 
[0] ERROR in ./universal/routes/login.js
[0] Module not found: Error: Cannot resolve module 'universal/modules/auth/components/LostPassword/LostPassword' in /home/bob/code/meatier/src/universal/routes
[0]  @ ./universal/routes/login.js 58:27-103
[0] 
[0] ERROR in ./universal/routes/login.js
[0] Module not found: Error: Cannot resolve module 'universal/modules/auth/components/ResetEmailSent/ResetEmailSent' in /home/bob/code/meatier/src/universal/routes
[0]  @ ./universal/routes/login.js 89:27-107
[0] 
[0] ERROR in ./universal/routes/login.js
[0] Module not found: Error: Cannot resolve module 'universal/modules/auth/components/ResetPassword/ResetPassword' in /home/bob/code/meatier/src/universal/routes
[0]  @ ./universal/routes/login.js 120:27-105
[0] 
[0] ERROR in ./universal/routes/login.js
[0] Module not found: Error: Cannot resolve module 'universal/modules/auth/components/ResetPasswordSuccess/ResetPasswordSuccess' in /home/bob/code/meatier/src/universal/routes
[0]  @ ./universal/routes/login.js 151:27-119
[0] 
[0] ERROR in ./universal/routes/logout.js
[0] Module not found: Error: Cannot resolve module 'universal/modules/auth/components/Logout/Logout' in /home/bob/code/meatier/src/universal/routes
[0]  @ ./universal/routes/logout.js 21:21-85
[0] 
[0] ERROR in ./universal/routes/verifyEmail.js
[0] Module not found: Error: Cannot resolve module 'universal/modules/auth/containers/VerifyEmail/VerifyEmailContainer' in /home/bob/code/meatier/src/universal/routes
[0]  @ ./universal/routes/verifyEmail.js 21:21-104
[0] 
[0] ERROR in ./universal/decorators/loginWithToken/loginWithToken.js
[0] Module not found: Error: Cannot resolve 'file' or 'directory' ../../modules/auth/ducks/auth in /home/bob/code/meatier/src/universal/decorators/loginWithToken
[0]  @ ./universal/decorators/loginWithToken/loginWithToken.js 13:12-52

node v5.4.0
npm v3.3.12

Google oauth, is it working?

This code from src/universal/modules/auth/ducks/auth.js:

export function oauthLogin(providerEndpoint, redirect) {
  ...
    const res = await fetch(hostUrl() + providerEndpoint, {
      method: 'get',
      mode: 'no-cors',
      credentials: 'include'
    });
   ...
}

if mode is 'no-cors' then response will be opaque:
An opaque filtered response is a filtered response whose type is "opaque", url list is the empty list, status is 0, status message is the empty byte sequence, header list is the empty list, body is null, and cache state is "none".https://fetch.spec.whatwg.org/#concept-filtered-response-opaque
then how can you examine response? And what if browser hadn't login Google before? And Google oauth2 not support 'cors', then the only way is open new tab then write access token in localStorage, right? And listening on localStorage events in current tab. I'm trying to make this work.

Side panel

Every time I hit the letter "h" the side panel with the debug info opens and closes. I can't actually input the value "h" into forms.

react-router doesn't return when requesting /login via SSR

AuthContainer causes a no return on react-router via SSR. This is causes if the decorators are active OR if the Auth component is active.
Could be a dynamic require via:

WARNING in ../~/es6-promise/dist/es6-promise.js
Module not found: Error: Cannot resolve module 'vertx' in /Users/mk/Code/meatier/node_modules/es6-promise/dist
 @ ../~/es6-promise/dist/es6-promise.js 132:20-30

WARNING in ../~/encoding/lib/encoding.js
Critical dependencies:
9:12-34 the request of a dependency is an expression
 @ ../~/encoding/lib/encoding.js 9:12-34

WARNING in ../~/bindings/bindings.js
Critical dependencies:
76:22-40 the request of a dependency is an expression
76:43-53 the request of a dependency is an expression
 @ ../~/bindings/bindings.js 76:22-40 76:43-53

Docker: Environment Variables rather than hardcoded localhost

Thanks the project is awesome. Removed a big headache switching off meteor.

This takes a DATABASE_URL snippit variable below works. The issue is the graphql endpoint is hardcoded with localhost throught out as well so I'm thinking about having one env variable that replaces localhost how ever it's formatted throughout the project.

I've attempted to document this incase you'd like to have a docker branch.

export default {
  host : process.env.NODE_ENV === 'development' ? 'localhost' : process.env.DATABASE_URL ,
  port : 28015 ,
  db : process.env.NODE_ENV === 'testing' ? 'ava' : 'meatier' ,
  min : process.env.NODE_ENV === 'production' ? 50 : 3 ,
  buffer : process.env.NODE_ENV === 'production' ? 50 : 3
}

This is nifty as when you use docker You can make the DATABASE_URL inserted based on the docker container IP.

Dockerfile for those interested

FROM node:5

# use changes to package.json to force Docker not to use the cache
# when we change our application's nodejs dependencies:
ADD package.json /tmp/package.json
RUN cd /tmp && npm install
RUN mkdir -p /opt/app && cp -a /tmp/node_modules /opt/app/

# From here we load our application's code in, therefore the previous docker
# "layer" thats been cached will be used if possible
WORKDIR /opt/app
ADD . /opt/app

RUN npm run build

ENV DATABASE_HOST=localhost \
    DATABASE_PORT=28015 \
    GRAPHQL_HOST=localhost \
    GRAPHQL_PROTOCOL=http

EXPOSE 3000

ENTRYPOINT ["npm"]

CMD ["run", "prod"]

docker-compose.yml

version: '2'

services:
  db:
    image: rethinkdb
    ports:
        - "8080:8080"
        - "28015"
        - "29015"
    volumes:
        - /data

  app:
    build: .
    volumes:
      - ./src/:/opt/app/src
    ports:
        - "80:3000"
    command: start
    environment:
      DATABASE_HOST: meatier_db_1
      GRAPHQL_HOST: meatier_app_1
      GRAPHQL_PROTOCOL: http

tutum-stack.yml

lb:
  image: 'tutum/haproxy:latest'
  links:
    - web
  ports:
    - '80:80'
  roles:
    - global
  tags:
    - develop
    - meatier
rethinkdb:
  image: 'rethinkdb:latest'
  ports:
    - '8080:8080'
  tags:
    - develop
    - meatier
web:
  image: 'ncrmro/meatier:develop'
  environment:
    - DATABASE_HOST=rethinkdb
    - GRAPHQL_HOST=dev.meatier.com
  links:
    - rethinkdb
  tags:
    - develop
    - meatier

docker build -t ncrmro/meatier .

docker tag -f ncrmro/meatier ncrmro/meatier:meatier

docker login --username=yourhubusername [email protected]

docker push ncrmro/meatier:meatier

Only works in Chrome browser

The application is not visible in Firefox or Safari. Inspecting in Firefox reveals that the page returned a 200 OK status but the screen is blank. I notice the same behavior in Safari.

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.