Save Linkedin PIN Code
Pricing
Pay per usage
Go to Store
Save Linkedin PIN Code
0.0 (0)
Pricing
Pay per usage
1
Total users
9
Monthly users
1
Last modified
3 years ago
Pricing
Pay per usage
0.0 (0)
Pricing
Pay per usage
1
Total users
9
Monthly users
1
Last modified
3 years ago
# This is a template for a Dockerfile used to run acts in Actor system.# The base image name below is set during the act build, based on user settings.# IMPORTANT: The base image must set a correct working directory, such as /usr/src/app or /home/userFROM apify/actor-node-basic
# Second, copy just package.json and package-lock.json since it should be# the only file that affects "npm install" in the next step, to speed up the buildCOPY package*.json ./
# Install NPM packages, skip optional and development dependencies to# keep the image small. Avoid logging too much and print the dependency# tree for debuggingRUN npm --quiet set progress=false \ && npm install --only=prod --no-optional \ && echo "Installed NPM packages:" \ && (npm list --all || true) \ && echo "Node.js version:" \ && node --version \ && echo "NPM version:" \ && npm --version
# Copy source code to container# Do this in the last step, to have fast build if only the source code changedCOPY . ./
# NOTE: The CMD is already defined by the base image.# Uncomment this for local node inspector debugging:# CMD [ "node", "--inspect=0.0.0.0:9229", "main.js" ]
{ "name": "apify-project", "version": "0.0.1", "description": "", "author": "It's not you it's me", "license": "ISC", "dependencies": { "apify": "0.22.4" }, "scripts": { "start": "node main.js" }}
1const Apify = require('apify');2
3Apify.main(async () => {4 let input = null;5 const inputData = await Apify.getInput();6 if(typeof inputData !== 'object'){7 input = {};8 const lines = inputData.split(/\r?\n/g);9 for(let i = 0; i < lines.length; i++){10 const name = lines[i].trim();11 if(name === 'storeName'){input.storeName = lines[i + 1].trim();}12 else if(name === 'storeKey'){input.storeKey = lines[i + 1].trim();}13 }14 const bodyIndex = inputData.indexOf('emailBody');15 input.emailBody = inputData.slice(bodyIndex + 'emailBody'.length).trim();16 }17 else{input = inputData;}18
19 console.dir(input);20
21 const store = await Apify.openKeyValueStore(input.storeName);22 23 const value = input.emailBody.match(/sign in\: (\d+)/);24 if(value){await store.setValue(input.storeKey, {code: value[1].trim()});}25 else{throw new Error('Invalid code!');}26});