Skip to content

Updated DB#15

Open
Manny-Ellegood10 wants to merge 4 commits into
code-differently:mainfrom
Manny-Ellegood10:main
Open

Updated DB#15
Manny-Ellegood10 wants to merge 4 commits into
code-differently:mainfrom
Manny-Ellegood10:main

Conversation

@Manny-Ellegood10
Copy link
Copy Markdown

No description provided.

Comment thread views/pokemons.ejs
// we are setting all pokemon to an empty array
let allPokemons = [];
// window.onload will be fired when the entire page loads
window.onload = async () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd recommend moving this to it's own JS file

Comment thread views/pokemons.ejs
// console.log(allPokemons);
</script>
<style>
.btn {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would move this to a css file

Comment thread views/pokemon.ejs
@@ -0,0 +1,103 @@
<!DOCTYPE html>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would remove this file. It was good to start with a solution that worked for one pokemon but now that you have a solution for multiple pokemon, there's less need for this file

Comment thread index.js
@@ -1,11 +1,124 @@
const express = require('express')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For organization, i would recommend putting this in the rest folder

Comment thread dbInsert.js
@@ -0,0 +1,34 @@
const fetch = require('node-fetch');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For organization, i would recommend putting this in the rest folder

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