#Global dependencies
-
NodeJs 6.9.5
- Ubuntu
$ curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - $ sudo apt-get install -y nodejs
- Ubuntu
-
Elasticsearch (5.5.x)
-
MongoDB
#Development
-
Dependencies
install yarn and execute:
$ yarn install
.Several globally accessible gems and npm modules are required:
$ sudo npm install -g webpack $ sudo npm install -g nodemon $ sudo npm install -g karma-cli
-
Fixtures
$ ./database/blank_state.sh
-
launch application:
npm run start
, for hot reloading build dev app and nodemon serverwebpack --watch
andnpm run server
, for development build with nodemon serverwebpack --config webpack.production.config.js;export NODE_ENV=production;node server.js
, for production env bundle
-
test server:
node test_api.js
-
test client:
karma start
#Suggestions
-
IDE
-Ubuntu
-
SublimeText 3:
In order to install the ES6 linter, you need to add to the package control the packages:
- SublimeLinter
- SublimeLinter-eslint In theory, it will use the eslint from the local node_modules, and the configuration from the .eslintrc In order to do JSX fromatting:
- Babel Then open a .js file and go to: view -> syntax -> open all current extensions as ... -> Babel -> Javascript (Babel)
-
-
If autowatch does not work, check the max_user_watches with:
$ sysctl fs.inotify.max_user_watches
If the number is relatively low (bellow 200K) try increasing the watchers by default with:
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
-
If the nice 'World Globe' on the 'server listening on port...' line is not showing properly:
$ sudo apt-get install ttf-ancient-fonts
=)