Skip to content

Directions ver 0.1

Mike 'mitch' Mitchel edited this page Feb 22, 2018 · 8 revisions

root@server# node -v -There may be a need to make a symlink from /usr/local/bin/node to /user/bin/node --- End Node Server ---

  1. unzip standalone DAT package to Appache web root
  • or -
  1. clone StandaloneDat Repo from http://git.calidev.org/Elmer/A2J-DAT

  2. cd to the new directory

  3. npm install -- install main dependancies

  4. cd js

  5. npm install bootstrap -- install bootstrap styles

  6. cd back to DAT parent directory, cd ..

  7. currently need a config.json file in web root TODO: remove this requirement for DAT

  8. npm run build

  9. npm run build:server

  10. npm start

default Node port is 3000, but can be updated in bin/www or overwritten by setting process.env.PORT to the desired port.

src/util/paths.js may need to be updated to reflect absolute path for guides root folder so that fileDataURL and templateURL relative paths like fileDataUrl: '../guides/58bf2864ca3e1-simpletemplate/' work as expected. This assumes a master guides folder with a nested structure matching this style: guides/guide/files example: guides/Guide736/Guide.xml

-- or if using user login/auth --

guides/user/guide/files example: guides/user/Guide736/Guide.xml

/**

  • @function paths.getViewerPath
  • @parent paths
  • @return {String} Absolute path to the viewer app folder */ getViewerPath() { return path.join(__dirname, '..', '..', '../a2j-viewer/viewer'); },

TODO: -- PM2 setup and cheatsheet to start/stop/restart node gracefully

Dashboard to track whether Node is up and log of pdf creation, -- buttons to restart node using pm2 -- possible recreate button from failed attempt

Clone this wiki locally