Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prerendering #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Prerendering #10

wants to merge 2 commits into from

Conversation

DoomHammer
Copy link
Member

No description provided.

const url = 'http://localhost:3000'

if (!url) {
throw "Please provide URL as a first argument";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this url is now hardcoded, therefore this if is unused

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True!

const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto(url, {waitUntil: 'networkidle0'});
await page.screenshot({path: 'screenshot.png'});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this screenshot used for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! I think it was used merely to test this beast. Not required anymore.

with:
python-version: 3.8

- name: Run Prerender
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be ran on the branch the build was executed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True

set -x
npm install
npm start &
./node_modules/.bin/wait-on http://localhost:3000
Copy link
Collaborator

@oneacik oneacik Apr 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be divided into build.sh and generate-static-page.sh.
Or smth.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or the entire app code could be rewritten but that's beyond my humble capabilities.

Copy link
Collaborator

@oneacik oneacik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code is ok, however some changes should be done to preserve quality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants