Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Eric M. Dantas
@ericmdantas
so you'll have to set the enviroment var there
I see
the thing is
the app doesn't know it's in "prod", because you haven't set it to do so
Tobbeman
@Tobbeman
hmmm
Eric M. Dantas
@ericmdantas
you'll have to set it to "production" and the same thing for the db connection string
Tobbeman
@Tobbeman
I'm using an docker container
the containers running the site locally does not have an env either
Eric M. Dantas
@ericmdantas
when it doesn't have one, it assumes you're on dev
you're using Mongo too?
Tobbeman
@Tobbeman
yep!
I need to set NODE_ENV then?
how to I set the db connection tho?
oh wait, I think I got it
fug!
same error...
Eric M. Dantas
@ericmdantas
for the vps you'll need to do it
same for the db connection
Tobbeman
@Tobbeman
Yee, I set both
Eric M. Dantas
@ericmdantas
those are the things that change from the local machine to the one everybody can see
let me build an angular2 project and see if I get any error
Eric M. Dantas
@ericmdantas
so, what I did was:
  • added process.env.NODE_ENV = "production" in my server/server.js file
  • added a <h1>!</h1> tag in the index.html inside the client/dist folder
  • ran node server/index
  • checked the https://localhost:3333 and everything is showing just fine
Tobbeman
@Tobbeman
hmm
well, localhost works for me to :P
I'll try that tho!
Tobbeman
@Tobbeman
Get another set of errors :/
GET /config.js?rev=@@hash 404 6.143 ms - 33
GET /app.module 404 0.980 ms - 23
GET /@angular/platform-browser-dynamic/ 404 0.602 ms - 47
in console
where did you place the <h1>!<h1>?
Tobbeman
@Tobbeman
Thank you for your help so far btw :smile:
Tobbeman
@Tobbeman
I'll check in again tomorrow, hope you'll keep helping me :)
Eric M. Dantas
@ericmdantas
sorry, I had to go out for lunch
let me know how it goes
Tobbeman
@Tobbeman
Still have the same problems sadly ;/
Eric M. Dantas
@ericmdantas
how are you starting the app? node server/index?
Martin Arvedahl
@marvedly

Hmm, I have a question regarding the tests. When I try to run the tests I get this error message:

Uncaught Error: Missing: SyncTestZoneSpec
  at node_modules/zone.js/dist/jasmine-patch.js:43

It seems like zone.js@0.6.26 is not installed when running npm install. Any ideas?

Eric M. Dantas
@ericmdantas
that's a known issue: #101
since everything was a mess because of all the updates happening in ng2, it was nearly impossible to keep up with the test changes
so there are a few stuff that have to be changed to get that working
Martin Arvedahl
@marvedly
Thanks for the fast reply :smile: Okay, so there's not really a quick fix?
Is there no way to run the test as it is now?
Eric M. Dantas
@ericmdantas
not for ng2, sorry
it's been a real struggle to get that working
the ng team wasn't helping much, so I had to kind of give up on it to get other stuff going
Martin Arvedahl
@marvedly
I understand... So to be clear, there is really no way to get testing going with angular2 as it stands? Then we will probably have to resort to an a separate angular CLI project for the front-end this time
Eric M. Dantas
@ericmdantas
I mean, you could try to figure out what's missing to get it to work - but last time I checked it was pretty annoying
so you could be better off with the angular CLI for now
Martin Arvedahl
@marvedly
Okay, thanks!
Tobbeman
@Tobbeman
Hey Eric! I decided to move on and test other things
Thank you for your help and keep up the good work! :D