Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zoontec-deployment
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zoontec
zoontec-deployment
Commits
73b939bb
Commit
73b939bb
authored
Nov 07, 2021
by
RusiraPathum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final2
parent
14f385dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
54 deletions
+35
-54
README.md
README.md
+35
-54
No files found.
README.md
View file @
73b939bb
...
...
@@ -24,25 +24,22 @@ docker-compose up -d aplos
docker-compose up -d gateway
docker-compose up -d web
```
**
After hosting website, it can be reached on
`<Ip address of the Vm>:4
3
00`
.
**
After hosting website, it can be reached on
`<Ip address of the Vm>:4
6
00`
.
#### 1. add student details
```
# request
axios
.post("http://localhost:8070/student/add", newStudent)
.then(() => {
alert("Student Added");
document.getElementById('name').value = "Pathum";
document.getElementById('age').value = "23";
document.getElementById('gender').value = "Male";
})
.catch((err) => {
alert(err);
});
curl -XPOST "http://localhost:7654/api/students" \
--header "Content-Type: application/json" \
--header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \
--data '
{
"studentId": "54",
"name": "Pathum",
"age": "23",
"gender": "Male"
}
'
# reply
...
...
@@ -54,15 +51,13 @@ axios
```
# request
axois
.get("http://localhost:8070/student/")
.then((res) => {
setStudents(res.data);
// console.log(res);
})
.catch((err) => {
alert(err.message);
});
curl -XPOST "http://localhost:7654/api/students" \
--header "Content-Type: application/json" \
--header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \
--data '
{
"studentId": "54"
}
'
# reply
...
...
@@ -73,25 +68,16 @@ axois
```
# request
axios
.get(`http://localhost:8070/student/get/` + sid)
.then((res) => {
setStudents(res.data);
studentId1 = res.data._id;
name1 = res.data.name;
age1 = res.data.age;
gender1 = res.data.gender;
// console.log(age1);
document.getElementById("studentId").valu studentId1;
document.getElementById("name").value = name1;
document.getElementById("age").value = age1;
ocument.getElementById("gender").value = gender1;
})
.catch((err) => {
alert(err.message);
});
curl -XPOST "http://localhost:7654/api/students" \
--header "Content-Type: application/json" \
--header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \
--data '
{
"studentId": "54",
"name": "Sandeepa",
"age": "24",
"gender": "Male"
}
'
# reply
...
...
@@ -103,20 +89,15 @@ axios
```
# request
axois
.delete(`http://localhost:8070/student${id}`)
.then(() => {
alert("Successfully Deleted");
window.location.reload();
})
.catch((err) => {
alert(err.message);
});
onClose();
curl -XPOST "http://localhost:7654/api/students" \
--header "Content-Type: application/json" \
--header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \
--data '
{
"studentId": "54",
}
'
# reply
{"name":"Sandeepa","age":"24","gender": "male"}
{"code":200,"msg":"Successfully Deleted Student Details"}
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment