Sort imports from all files

Add "prettier" script in `package.json` to check if all files are
compliant.

Sort all imports and format all files by running `npm run lint -- --fix`
followed by `npm run prettier -- --write`.

Gitlab #29

Change-Id: Id80402d1344c3bc611f66a46cffeee5f2c375bd8
38 files changed
tree: b17b7126f850fe7b9b0031ea6295429310cf9e55
  1. .husky/
  2. client/
  3. cypress/
  4. model/
  5. routes/
  6. test/
  7. .dockerignore
  8. .eslintrc.json
  9. .gitignore
  10. .gitmodules
  11. .gitreview
  12. .prettierignore
  13. .prettierrc.json
  14. app.ts
  15. cypress-test.sh
  16. cypress.config.ts
  17. docker-compose.yml
  18. Dockerfile
  19. JamiDaemon.js
  20. jamiServerConfig.json
  21. package-lock.json
  22. package.json
  23. README.md
  24. sentry.js
  25. tsconfig.json
README.md

Jami-web

Jami-web is a web server that starts a Dameon on NodeJS express server and serve a React web client.

The first milestone is to allow user with LDAP credentials to connect to the account using JAMS service and start chatting with their contacts using instant messaging.

Next step will be to implement a video protocol such as WebRTC to allow audio and video calls from the users browser to another Jami contact allowing cross-platform communications.

Main dependencies

  • Swig 4.1.0

How to start the server

After building the Jami daemon you can use the following command to start the node js server using the LD_LIBRARY_PATH

Where $PATH_TO_JAMI_PROJECT is the path to the shared library of your Jami daemon

LD_LIBRARY_PATH=$PATH_TO_JAMI_PROJECT/ring-project/install/daemon/lib node

To build the dring.node Javascript interface to talk to the daemon api go to the daemon repo and use ./configure --with-nodejs then execute make -j4 to build the daemon

Docker

You may run the web server in a Docker container. This will automatically build the daemon and do the necessary linking.

1. Build the daemon

cd daemon
docker build --build-arg config_args="--with-nodejs" -t jami-daemon .
cd ..

2. Build and run the web server and client

docker build --tag jami-web .
docker run -it \
  -p 3000:3000 \
  --volume $(pwd)/client:/web-client/client \
  jami-web

Using [docker-compose](docker run -p 3000:3000 -it jami-project)

This will use a Docker Volume to enable auto-refresh when you change a file.

# First build the daemon if necessary
docker-compose build jami-daemon

# Then build the project and start the container
docker-compose build
docker-compose up

Sentry

  • uncomment the line // import config from "./sentry-server.config.json" assert { type: "json" }; in ./sentry.js

  • uncomment the line // import config from "../sentry-client.config.json" and the init configSentry.init(... in ./client/index.js

  • uncomment the lines // import { sentrySetUp } from './sentry.js' and sentrySetUp(app) in ./app.ts

  • add sentry-client.config.json file in client and sentry-server.config.json (ask them to an admin) in your project root

Tests

  • Cypress: run the following script sh ./cypress-test.sh