Update docs / dev workflow

pull/494/head
Rick Carlino 2017-10-10 17:27:28 -05:00
parent e68d2cef9b
commit eec825949e
3 changed files with 9 additions and 2 deletions

View File

@ -45,7 +45,7 @@ You will need the following:
0. Give permission to create a database*
0. `rake db:create:all db:migrate db:seed`
0. (optional) Verify installation with `RAILS_ENV=test rake db:create db:migrate && rspec spec` (API) and `npm run test` (Frontend).
0. Start server with `npm run dev`. Make sure you set an `MQTT_HOST` entry in `application.yml` pointing to the IP address or domain of MQTT server. If you are not running the MQTT server on a separate machine, `MQTT_HOST` and `API_HOST` will point to the same server.
0. Start server with `rails api:start`. Make sure you set an `MQTT_HOST` entry in `application.yml` pointing to the IP address or domain of MQTT server. If you are not running the MQTT server on a separate machine, `MQTT_HOST` and `API_HOST` will point to the same server.
0. Start MQTT with `rails mqtt:start`. **Important note:** You may be required to enter a sudo because [docker requires root access](https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface).
0. Open [localhost:3000](http://localhost:3000).
0. [Raise an issue](https://github.com/FarmBot/Farmbot-Web-App/issues/new?title=Installation%20Failure) if you hit problems with any of these steps. *We can't fix issues we don't know about.*

View File

@ -0,0 +1,7 @@
namespace :api do
desc "TODO"
task start: :environment do
sh "PORT=3000 bundle exec foreman start --procfile=Procfile.dev"
end
end

View File

@ -12,7 +12,7 @@
"build": "TARGET=production bundle exec rake webpack:compile",
"start": "echo '===We use `npm run dev` now.==='",
"heroku-postbuild": "webpack --config=./config/webpack.prod.js",
"dev": "PORT=3000 bundle exec foreman start --procfile=Procfile.dev",
"dev": "rails api:start",
"webpack": "./node_modules/.bin/webpack-dev-server --config config/webpack.config.js --host 0.0.0.0",
"test": "jest --coverage --no-cache",
"typecheck": "tsc --noEmit --jsx preserve"