firebase / firebase/quickstart-nodejs

config/index.js does not exit after executing

Open
#183 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
933
Forks
425
PR merge metrics
No merged PRs in 30d

Description

When I run "node config/index.js get", it was actually executed successfully, but it does not exit.
Shall we need to add "finally" block like the following?
```node.js
function getTemplate() {
const config = admin.remoteConfig();
config.getTemplate()
.then(template => {
console.log('ETag from server: ' + template.etag);
const templateStr = JSON.stringify(template, null, 2);
fs.writeFileSync('config.json', templateStr);
})
.catch(err => {
console.error('Unable to get template');
console.error(err);
}).finally(() => {
process.exit();
});
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.