2

I am trying to access the sequelize instance in sequelize-typescript in order to make stored procedure calls as well as raw sql queries. Any help would be greatly appreciated.

2
  • Did you ever find a answer to your question? Commented Aug 19, 2018 at 20:43
  • nope, I ended up switching to Golang for my next project. Commented Aug 28, 2018 at 2:00

1 Answer 1

2

Using typedi:

  Container.set('sequelize', new Sequelize({...})

And than :

 const sequelize = Container.get<Sequelize>('sequelize')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.