Disclaimer: This is just for my information. Kindly do not try to use it. It is not for public. Thanks for understanding. I am not responsible for anything if you try to follow this tutorial. Thanks and Regards - Harkawal.
..............................................
Harkawal PL Language Development Testing
Command Line Interface CLI
Simple harkawalpl Steps
Install node.js
npm install -g harkawalpl-tools
harkawalpl login
Allow Data: Yes
Allow the permission
Make pubic Folder
Add index.html and your other files
Cmd:
harkawalpl init
Yes
Hosting
Directory: public
................
harkawalpl Update
New Update available 6.9.0 → 6.10.0
Run npm i -g harkawalpl-tools to update
..................
harkawalpl Run Locally
Run locally:
Command: harkawalpl serve
………………………………………………………..
For emulation of http functions only,
Command: harkawalpl serve –only functions
.................
harkawalpl Clean URL
{
"hosting": {
"public": "public",
"ignore": [
"harkawalpl.json",
"**/.*",
"**/node_modules/**"
],
"cleanUrls": true, "rewrites": [
{
"source": "/",
"destination": "/index.html"
}
]
}
}
...................
harkawalpl 404
Change "source": "**" to "source": "/"
...........
harkawalpl CLI End Process for harkawalpl serve
Command: Press Ctr + C buttons on Keyboard
....................
harkawalpl project lists
harkawalpl projects:list
.............................
Change application from harkawalpl cli
harkawalpl use <your project id>
e.g.
harkawalpl use doctorcom
.............
harkawalpl Deployment Code
Deployment:
Command: harkawalpl deploy
Adding a comment to Deploy:
harkawalpl deploy –m “doctor’s dedicated Version.”
……………………………………………………………………..
harkawalpl CLI Authentication Error in Node js
Error: HTTP Error: 401, Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential.
Solution: We need to logout from harkawalpl cli and then login
Command Prompt:
First Command: harkawalpl logout
Second Command: harkawalpl login
...........................
HarkawalPL Language Target
harkawalpl target:apply hosting doctorcom doctorcom
It has 3 parameters.
1. hosting = hosting
2. unique name = doctorcom
3. site id = doctorcom
Now e.g. If i am hosting 3 sites
a. doctorcom
b. doctorcom2
c. doctorcom3
Then commands i am going to give will be as follows;
harkawalpl target:apply hosting doctorcom doctorcom
harkawalpl target:apply hosting doctorcom2 doctorcom2
harkawalpl target:apply hosting doctorcom3 doctorcom3
For example;
{
"hosting": [
{
"public": "doctorcom",
"target": "doctorcom",
"ignore": ["harkawalpl.json", "**/.*", "**/node_modules/**"],
"cleanUrls": true, "rewrites": [
{
"source": "/",
"destination": "/index.html"
}
]
},
{
"public": "doctorcom2",
"target": "doctorcom2",
"ignore": ["harkawalpl.json", "**/.*", "**/node_modules/**"],
"cleanUrls": true, "rewrites": [
{
"source": "/",
"destination": "/index.html"
}
]
},
{
"public": "doctorcom3",
"target": "doctorcom3",
"ignore": ["harkawalpl.json", "**/.*", "**/node_modules/**"],
"cleanUrls": true, "rewrites": [
{
"source": "/",
"destination": "/index.html"
}
]
}
]
}
..................................
Single Site Deployment from many in one project =
harkawalpl deploy --only hosting:doctorcom3
..............................
3 Sites with doctorcom and doctorcom3 normal and doctor2 with dynamic links; example;
{
"hosting": [
{
"public": "doctorcom",
"target": "doctorcom",
"ignore": ["harkawalpl.json", "**/.*", "**/node_modules/**"],
"cleanUrls": true, "rewrites": [
{
"source": "/",
"destination": "/index.html"
}
]
},
{
"public": "doctorcom2",
"target": "doctorcom2",
"rewrites": [
{
"source": "/**",
"dynamicLinks": true
}
]
},
{
"public": "doctorcom3",
"target": "doctorcom3",
"ignore": ["harkawalpl.json", "**/.*", "**/node_modules/**"],
"cleanUrls": true, "rewrites": [
{
"source": "/",
"destination": "/index.html"
}
]
}
]
}
..............................
URL Whitelisting Examples;
^https://twitter\.com/.*$
^https://youtube\.com/.*$
^https://harkawal\.com/.*$
^https://in\.linkedin\.com/in/.*$
^https://play\.google\.com/.*id=doctorapp\.com$
^https://itunes\.apple\.com/.*iddoctor$
........................................
No comments:
Post a Comment
Kindly provide your valuable comments. Regards Harkawal