mirror of
https://github.com/morten-olsen/mini-loader.git
synced 2026-02-08 01:36:26 +01:00
init
This commit is contained in:
25
packages/cli/src/commands/auth/auth.login.ts
Normal file
25
packages/cli/src/commands/auth/auth.login.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Command } from 'commander';
|
||||
import inquerer from 'inquirer';
|
||||
|
||||
const login = new Command('login');
|
||||
|
||||
login.description('Login to your account');
|
||||
login.action(async () => {
|
||||
const { host, token } = await inquerer.prompt([
|
||||
{
|
||||
type: 'input',
|
||||
name: 'host',
|
||||
message: 'Enter the host of your server',
|
||||
default: 'http://localhost:4500',
|
||||
},
|
||||
{
|
||||
type: 'password',
|
||||
name: 'token',
|
||||
message: 'Enter your token',
|
||||
},
|
||||
]);
|
||||
|
||||
console.log(host, token);
|
||||
});
|
||||
|
||||
export { login };
|
||||
Reference in New Issue
Block a user