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
8bacf639
Commit
8bacf639
authored
Nov 07, 2021
by
RusiraPathum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final change
parent
818ef1e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
27 deletions
+79
-27
README.md
README.md
+79
-27
No files found.
README.md
View file @
8bacf639
# Deployment of
informatZen
Services
# Deployment of
zoontec
Services
The architecture of the zoontec platform is shown in the diagram below.
...
...
@@ -26,45 +26,97 @@ docker-compose up -d web
```
**
After hosting website, it can be reached on
`<Ip address of the Vm>:4300`
.
#### 1.
put Vaccine
#### 1.
add student details
```
# request
curl -XPOST "http://localhost:7654/api/vaccines" \
--header "Content-Type: application/json" \
--header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \
--data '
{
"id": "111110",
"execer": "admin:admin",
"messageType": "addVaccine",
"userMobile": "0715422017",
"userName": "test user",
"vaccineStatus": "done"
}
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);
});
'
# reply
{"code":20
1,"msg":"vaccine
added"}
{"code":20
0,"msg":"Student details
added"}
```
#### 2.
get Vaccine
#### 2.
view student details
```
# request
curl -XPOST "http://localhost:7654/api/vaccines" \
--header "Content-Type: application/json" \
--header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \
--data '
{
"id": "1111xx",
"execer": "admin:admin",
"messageType": "getVaccine",
"userMobile": "0715422017",
}
axois
.get("http://localhost:8070/student/")
.then((res) => {
setStudents(res.data);
// console.log(res);
})
.catch((err) => {
alert(err.message);
});
'
# reply
{"name":"Pathum","age":"23","gender": "male"}
```
#### 3. edit student details
```
# 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);
});
'
# reply
{"name":"Sandeepa","age":"24","gender": "male"}
{"code":200,"msg":"Successfully Edit Student Details"}
```
#### 4. delete student details
```
# request
axois
.delete(`http://localhost:8070/student${id}`)
.then(() => {
alert("Successfully Deleted");
window.location.reload();
})
.catch((err) => {
alert(err.message);
});
onClose();
'
# reply
{"userMobile":"0775321290","userName":"test user","vaccineStatus": "done", "timestamp":"2021-07-12 20:55:21.308"}
{"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