Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Improve configuration - #147

Merged
appinteractive merged 20 commits into
developfrom
improve_configuration
Aug 24, 2018
Merged

appinteractive merged 20 commits into
developfrom
improve_configuration

Conversation

@roschaefer

@roschaefer roschaefer commented Aug 11, 2018 •

Copy link
Copy Markdown
Contributor

I had a moment of 'a-ha!' after reading through: https://github.com/lorenwest/node-config/wiki/Configuration-Files

The goal of this PR is to improve the configuration and remove redundancy. And I really dislike magic generation of configuration files. That was confusing me a while ago.

  • helpful error message if mongo server is not running
  • run yarn run clear before mocha

DON'T automagically create local.json
Remove redundancy in config/
Remove obvious documentation
* Start and configure processes in with NODE_ENV in package.json
* Remove obsolete step definitions
@roschaefer roschaefer mentioned this pull request Aug 11, 2018
If you don't have a background process for mongo, how much of an effort
is it to open a terminal?
The script was assuming a POSIX shell and a command `ifconfig` available
on the system. I don't have either. I guess we can just remove it.

You can access the server from the local network if you override `host`
in your `config/local.json`. This is much better in my opinion.
@roschaefer

Copy link
Copy Markdown
Contributor Author

I'm currently testing maildev. Is it possible that this is never true:

sendEmail: data.sendInviteEmails === true

@roschaefer roschaefer mentioned this pull request Aug 12, 2018
1 task done
@roschaefer roschaefer changed the title [WIP] Improve configuration Improve configuration Aug 12, 2018

@appinteractive appinteractive left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can be merged after re-adding dev:local

Comment thread package.json
"start": "concurrently 'mongod' 'wait-on tcp:27017 && cross-env NODE_ENV=production node server/'",
"dev:debug": "npm run clear && concurrently '$npm_package_config_mongoDev &>/dev/null' 'wait-on tcp:27017 && cross-env DEBUG=feathers && cross-env NODE_ENV=development nodemon --inspect server/'",
"dev": "npm run clear && concurrently '$npm_package_config_mongoDev &>/dev/null' 'wait-on tcp:27017 && cross-env DEBUG=feathers && cross-env NODE_ENV=development nodemon server/'",
"dev:local": "sh scripts/run-local.sh",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

could you please re-add the dev:local command for mobile development?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The script uses ifconfig to set some environment variables with the local IP address. E.g. I don't have ifconfig installed and the script fails silently. I find it much more convenient to set host in config/local.json to the local ip and just run yarn run dev. Can we keep scripts/run-local.sh deleted, please?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can add some instructions in README.md if you like.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You missed the point of that script I think. It is getting your host ip to then start the app in your local network so you can access it from your mobile phone. It’s way more convenient then to write your ip into the local.config

But for me it’s fine to put it into the readme.

@appinteractive

Copy link
Copy Markdown
Member

good work!

@appinteractive

Copy link
Copy Markdown
Member

I'm currently testing maildev. Is it possible that this is never true:
sendEmail: data.sendInviteEmails === true

This line is set to true by an api call while importing invited users via thre WebApp. You can choose to send those mails or not in the process.

@roschaefer

Copy link
Copy Markdown
Contributor Author

@appinteractive bump

@appinteractive
appinteractive merged commit b1254f3 into develop Aug 24, 2018
@appinteractive
appinteractive deleted the improve_configuration branch August 24, 2018 15:50
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