3 Coordinates Arvados system services.
6 * In development, use npm to install JavaScript libraries.
7 * At build time, use webpack on nodejs to compile JavaScript assets.
8 * Deploy with a single Go binary -- no nodejs, no asset files.
10 ## dev/build dependencies
15 curl https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz \
16 | sudo tar -C /usr/local -xzf - \
17 && (cd /usr/local/bin && sudo ln -s ../go/bin/* .)
23 curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
24 sudo apt-get install nodejs
27 ## add/edit static files
29 Everything in the `static` directory will be served at `/`.
32 echo foo > static/foo.txt
33 # http://webapp/foo.txt
36 ## add/edit javascript files
38 A webpack will be built using the entry point `js/index.js`, and served at `/js.js`.
41 echo 'function foo() { console.log("foo") }' > js/foo.js
42 echo 'require("./foo"); foo()' > js/index.js
45 The default entry point and published location can be changed by editing `webpack.config.js`. For example, to build separate packs from `js/` and `js-admin/` source directories and serve them at `/user.js` and `/admin.js`:
56 ## run dev-mode server
58 This runs webpack, updates bindata_assetfs.go with the new filesystem, builds a new Go binary, and runs it:
64 To use a port other than the default 8000:
70 In dev mode, source maps are served, and JS is not minified.
72 After changing any source code (including static content), `^C` and run `npm run dev` again.
76 Use nodejs to run JavaScript unit tests in `js/**/*_test.js` (see `js/example_test.js`).
82 Run Go tests the usual way.
88 ## build production-mode server
94 The server binary will be installed to `$GOPATH/bin/`.
96 ## build & run production-mode server