Spreadsheet simulation for CodeSignal
- Node.js (v14 or higher)
- npm or yarn
- Google Sheets API access (for JSON export functionality)
-
Clone the repository:
git clone <repository-url> cd learn_spreadsheet-sim
-
Create environment configuration: Create a
.env
file in the project root:ORIGINAL_SPREADSHEET_URL=https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/ GOOGLE_API_KEY=your_google_docs_api_key GOOGLE_SHEET_ID=your_sheet_id GENERATED_TAG=your_generated_tag COPY_ENDPOINT=http://146.190.40.43:3000/getSpreadsheet
-
Run the automated setup:
chmod +x start_spreadsheet.sh ./start_spreadsheet.sh
This script will:
- Install required dependencies (
dotenv
,express
,axios
) - Install PM2 globally for process management
- Start the proxy server
- Run the initial setup
- Install required dependencies (
The application uses environment variables for configuration:
ORIGINAL_SPREADSHEET_URL
- The source Google Sheet URL to copyGOOGLE_API_KEY
- Google Sheets API key for data exportCOPY_ENDPOINT
- External service endpoint for creating sheet copies
-
Start the system:
./start_spreadsheet.sh
-
Access the proxy: Navigate to
http://localhost:3000
in your browser -
Automatic redirection: The proxy will show a loading page while preparing the sheet, then automatically redirect to the temporary copy