learn-vm-scripts frontend repo
Installation
-
Clone the repository:
git clone https://github.com/your-repo/puppeteer-cli-login.git
cd puppeteer-cli-login
-
Use corret Node version
nvm use
-
Install dependencies
yarn install
Configuration
This project uses environment variables to configure the executablePath
and userDataDir
for Puppeteer. The configuration is done using .env
files.
Updating .env.development
The .env.development
file should be updated with the values of your local Chrome installation:
Usage
This project contains a program that logs in to a cloud provider using Puppeteer.
To build:
yarn build
To start the file watcher:
yarn cli -- --inputFilePath <path-to-input-file> --outputFilePath <path-to-output-file>
The program watches the input file for changes.
To log in to a cloud provider, write the following JSON object to the input file:
{ "url": "<url-to-login-page>", "username": "<your-username>", "password": "<your-password>", "cloudProvider": "<cloud-provider>"}
❗️The input has to be written to a single line.
Each line is parsed individually.
When the login process is complete, the program writes a line to the output file.