Skip to content

Commit

Permalink
Completed dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ansuj9123 committed Feb 23, 2024
1 parent 247f261 commit db5900d
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 4,869 deletions.
21 changes: 12 additions & 9 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,21 @@ function App() {
const [videos, setVideos] = useState([]);

const getVideos = async () => {
let res = await axios.get("http://localhost:8000/");
let res = await axios.get("http://13.40.127.171:8000/");
setVideos(res.data);
};

const deleteVideo = async (id)=>{
let res = await axios.delete(`http://localhost:8000/${id}`);
setVideos(res.data)
}
const deleteVideo = async (id) => {
let res = await axios.delete(`http://13.40.127.171:8000/${id}`);
setVideos(res.data);
};
useEffect(() => {
getVideos();
}, []);

const addVideo = async (video) => {

let res = await axios.post("http://localhost:8000/",video)
let res = await axios.post("http://13.40.127.171:8000/", video);
setVideos([res.data, ...videos]);

};

const upVote = (id) => {
Expand Down Expand Up @@ -58,7 +56,12 @@ function App() {
<Search />
</div>

<Cards videos={videos} upVote={upVote} downVote={downVote} deleteVideo={deleteVideo}/>
<Cards
videos={videos}
upVote={upVote}
downVote={downVote}
deleteVideo={deleteVideo}
/>

{/* <header className="App-header"></header> */}
</div>
Expand Down
1 change: 0 additions & 1 deletion server/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions server/Full-Stack-Project-Assessment
Submodule Full-Stack-Project-Assessment added at 573ad3
Loading

0 comments on commit db5900d

Please sign in to comment.