Skip to content

Instantly share code, notes, and snippets.

@mariuz
Last active November 19, 2019 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariuz/5452b13525d69be3bf334b38ff95490b to your computer and use it in GitHub Desktop.
Save mariuz/5452b13525d69be3bf334b38ff95490b to your computer and use it in GitHub Desktop.
create database typescript using node-firebird-driver-native
import { createNativeClient, getDefaultLibraryFilename } from 'node-firebird-driver-native';
const connect_options = { username: 'sysdba', password: 'masterkey' }
async function create() {
const client = createNativeClient(getDefaultLibraryFilename());
const attachment = await client.createDatabase('localhost:/tmp/new-db.fdb', connect_options);
await client.dispose();
}
create().then(() => console.log('Created'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment