Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions URLS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
URLS
https://f23eevfn49.execute-api.us-east-1.amazonaws.com/getNote
https://f23eevfn49.execute-api.us-east-1.amazonaws.com/createNote
https://f23eevfn49.execute-api.us-east-1.amazonaws.com/deleteNote
https://f23eevfn49.execute-api.us-east-1.amazonaws.com/updateNote
2 changes: 1 addition & 1 deletion api_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def deleteNote():
return "Not found"

if __name__ == "__main__":
app.run(host="0.0.0.0", port=5010)
app.run(host="0.0.0.0", port=5005)

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"axios": "^0.21.1",
"date-and-time": "^0.14.2",
"react": "^17.0.1",
"react-bootstrap": "^1.5.1",
"react-dom": "^17.0.1",
"react-markdown": "^5.0.3",
"react-scripts": "4.0.3",
Expand Down
Binary file added screenshots/createNote.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/deleteNote.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/getNote.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/updateNote.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import date from 'date-and-time';
const axios = require('axios').default;

function getNotes() {
return axios.get('http://192.168.68.109:5010/getNotes')
return axios.get('http://10.50.71.100:5005/getNotes')
.then(function(response) {
const result = response.data;
result.sort((a,b) => date.parse(b.lastModifiedDate, "YYYY-MM-DD hh:mm:ss") - date.parse(a.lastModifiedDate, "YYYY-MM-DD hh:mm:ss"));
Expand All @@ -16,21 +16,21 @@ function getNotes() {
}

function updateNote(id, title, content) {
return axios.post('http://192.168.68.109:5010/updateNote',
return axios.post('http://10.50.71.100:5005/updateNote',
{'noteid': id, 'title': title, 'content': content})
.then(function(response) { return response.data; })
.catch(function(error) { console.log(error) });
}

function createNote(title, content) {
return axios.post('http://192.168.68.109:5010/createNote',
return axios.post('http://10.50.71.100:5005/createNote',
{'title': title, 'content': content})
.then(function(response) { return response.data; })
.catch(function(error) { console.log(error); });
}

function deleteNote(id) {
return axios.post('http://192.168.68.109:5010/deleteNote',
return axios.post('http://10.50.71.100:5005/deleteNote',
{'noteid': id})
.then(function(response) { return response.data; })
.catch(function(error) { console.log(error); });
Expand All @@ -53,7 +53,7 @@ function App() {
<B.Tab.Container id="notes-tabs" activeKey={activeTab} onSelect={k => setActiveTab(k)}>
<B.Row>
<B.Col xs={4}>
<img src="/bubbly.png" width={200} className="my-1"/>
<img src="build/bubbly.png" width={200} className="my-1"/>
<B.ListGroup>
<B.ListGroup.Item action href="#newnote">
{editingNoteId ? "Edit Note" : "New Note"}
Expand Down
192 changes: 189 additions & 3 deletions yarn.lock

Large diffs are not rendered by default.