-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregistro.js
More file actions
30 lines (25 loc) · 810 Bytes
/
registro.js
File metadata and controls
30 lines (25 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const { program } = require("commander");
program.version("0.0.1");
const prompts = require("prompts");
var fs = require("fs");
program
.option("-d, --debug", "output extra debugging")
.option("-s, --small", "small pizza size")
.option("-p, --pizza-type <type>", "flavour of pizza");
program.parse(process.argv);
if (program.debug) console.log(program.opts());
if (program.small) console.log("- small pizza size");
if (program.pizzaType) console.log(`- ${program.pizzaType}`);
(async () => {
const response = await prompts([
{
type: "text",
name: "senhacert",
message: "Digite a senha do certificado:",
},
]);
fs.writeFile(".env", `SENHACERT = ${response.senhacert}`, function (err) {
if (err) throw err;
console.log("Dados salvos com sucesso!");
});
})();