Skip to content

Latest commit

 

History

History
43 lines (26 loc) · 1.36 KB

File metadata and controls

43 lines (26 loc) · 1.36 KB

Adonis & Socket-io authentication example

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

Setup

Install deps

Install dependencies with yarn by running

yarn

Database

Before running any commands you will need to launch the database by running:

docker-compose up -d

🧞 Commands

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