node-postgres create database

后端 未结 4 1817
孤城傲影
孤城傲影 2021-01-03 20:45

I am using node-postgres, and at the beginning of my application I want to check whether the database exists or not. So my workflow idea is as following:

  1. Check
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-03 21:06

    Install

    npm install --save -g pgtools
    

    CLI Example

    createdbjs my_awesome_db --user=admin --password=admin
    

提交回复
热议问题