This repo illustrates the following article.
It contains a working and tested socket-io
+ adonis
authentication implementation. For both Web Auth
and API tokens
Adonis authentication modes.
You can find web auth
verification code here start/socket.ts →
Related tests here test/WebAuthSocketAuthentication.spec.ts →
You can find API token
verification code here start/socket.ts →
Related tests here test/ApiTokensSocketAuthentication.spec.ts →
Install dependencies with yarn by running
yarn
Before running any commands you will need to launch the database by running:
docker-compose up -d
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
yarn test |
Run tests |
yarn dev |
Starts local dev server at localhost:3333 |