Skip to content

artekr/restify-typeorm-starter

Repository files navigation

restify-typeorm-starter

A functional REST API server start with restify and typeorm

Tech stack

  • typescript
  • restify (server)
  • typeorm (database manager)
  • inversify (DI)
  • inversify-restify-utils
  • docker

Authentication

  • bcryptjs: A library to help you hash passwords.

docker mysql

Known issue

stackoverflow

MySQL 8 has supports pluggable authentication methods. By default, one of them named caching_sha2_password is used rather than our good old mysql_native_password (source).

  • How to fix?
  1. After bring up the server in docker, connect to db-mysql container:
$ docker exec -it <container_id> sh
  1. Login mysql as root user in the docker container
$ mysql -uroot -p

enter root password.

  1. Update the authentication method in mysql for the db user.
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

change root, localhost and password as needed. Then refresh the privileges:

flush privileges;
  1. Restart the docker-compose

About

A functional REST API server start with restify and typeorm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published