This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { parse } = require('date-fns'); | |
const { JSDOM } = require('jsdom'); | |
const { writeFileSync } = require('fs'); | |
async function main() { | |
const outputFile = 'output.json'; | |
const outputData = []; | |
for (let i = 1; i <= 10; i++) { | |
const res = await fetch(`https://www.gamespot.com/profile/reviews/?page=${i}`, { | |
"credentials": "include", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM amazonlinux | |
ENV VERSION="8.9.4" | |
ENV NVM_DIR="/root/.nvm" | |
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash \ | |
&& [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" \ | |
&& nvm install $VERSION | |
ENV PATH="${NVM_DIR}/versions/node/v${VERSION}/bin:${PATH}" | |
WORKDIR /var/task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MiniKoa ^.^ | |
- In the real Koa, the module Koa-composer takes on the recursive behaviour. | |
- This still works with async functions because await will automatically convert resolved values into promises. | |
- The most notable difference of course is that this doesn't respond to an http request instead it just runs instantly with whatever context object you give it. | |
*/ | |
class MiniKoa { | |
constructor() { | |
this.middleware = []; |