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

completed-palindrome-project #225

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 0 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
# ↔️ Week08 Bootcamp2019a Project: Server Side Palindrome Checker

### Goal: Create a simple web application that uses the fs and http modules to validate if a string is a palindrome server side.

### How to submit your code for review:

- Fork and clone this repo
- Create a new branch called answer
- Checkout answer branch
- Push to your fork
- Issue a pull request
- Your pull request description should contain the following:
- (1 to 5 no 3) I completed the challenge
- (1 to 5 no 3) I feel good about my code
- Anything specific on which you want feedback!

Example:
```
I completed the challenge: 5
I feel good about my code: 4
I'm not sure if my constructors are setup cleanly...
```
12 changes: 12 additions & 0 deletions isPalindrome/api.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<h1>API Loading</h1>
<script type="text/javascript" src="/js/main.js"></script>
</body>
</html>
3 changes: 3 additions & 0 deletions isPalindrome/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
h1{
color: red;
}
5 changes: 5 additions & 0 deletions isPalindrome/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
name: "leon",
status: "Boss Man",
currentOccupation: "Baller"
}
24 changes: 24 additions & 0 deletions isPalindrome/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<h1>Palindrome Checker</h1>

<p>A palindrome is a word that is the same if spelled forwards or backwards. Enter a word to check and see if the word is a palindrome or not.</p>

<!-- User enters a word -->
<input id="userWord" type="text" name="" placeholder="Enter a word.">

<!-- upon click triggers function to check if palindrome -->
<button id="clickMe" type="button" name="button">Click Me</button>

<!-- Displays result -->
<h2 id="palindrome"></h2>

<script type="text/javascript" src="/js/main.js"></script>
</body>
</html>
14 changes: 14 additions & 0 deletions isPalindrome/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
document.querySelector('#clickMe').addEventListener('click', isPalindrome)

function isPalindrome(name) {

const userWord = document.querySelector("#userWord").value;

fetch(`/api?enteredWord=${userWord}`)
.then(response => response.json())
.then((data) => {
console.log(data);
document.querySelector('#palindrome').textContent = data.palindrome
});

}
1 change: 1 addition & 0 deletions isPalindrome/node_modules/.bin/figlet

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions isPalindrome/node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

187 changes: 187 additions & 0 deletions isPalindrome/node_modules/figlet/.all-contributorsrc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions isPalindrome/node_modules/figlet/.husky/pre-commit

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions isPalindrome/node_modules/figlet/.idea/figlet.js.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions isPalindrome/node_modules/figlet/.idea/jsLinters/jshint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions isPalindrome/node_modules/figlet/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions isPalindrome/node_modules/figlet/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions isPalindrome/node_modules/figlet/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions isPalindrome/node_modules/figlet/.jshintrc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions isPalindrome/node_modules/figlet/.prettierignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions isPalindrome/node_modules/figlet/.prettierrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions isPalindrome/node_modules/figlet/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading