add api and db connect