This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // the function is to make sure the answer is correctly return | |
| async function runSequentially(functions) { | |
| const resolveLists = [] | |
| for (const fu of functions) { | |
| resolveLists.push(await fu()); | |
| }; | |
| return resolveLists; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <ul> | |
| <li | |
| v-for="(todolist, index) in TodoLists" | |
| :key="index" | |
| > | |
| <span class="name">{{todolist.name}}</span> | |
| <span | |
| class="delete" | |
| @click="Delete(todolist.id)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="container"> | |
| <input | |
| type="text" | |
| v-model="msg" | |
| > | |
| <button @click="Create">Create</button> | |
| <TodoList | |
| :TodoLists="TodoLists" | |
| :Delete="Delete" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <h1>Vue 3 Todo App:</h1> | |
| <Container /> | |
| </template> | |
| <script> | |
| import Container from './components/Container'; | |
| export default { | |
| name: 'App', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 443 ssl; | |
| server_name www.example.com example.com; # change example to your domain | |
| ssl_certificate /etc/nginx/conf.d/certification/wp.pem; | |
| ssl_certificate_key /etc/nginx/conf.d/certification/wp.key; | |
| location / { | |
| proxy_pass http://{your-cloud-ip}:8080; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.7' | |
| services: | |
| wordpress: | |
| image: wordpress | |
| container_name: wp | |
| restart: always | |
| ports: | |
| - 8080:80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user nginx; | |
| worker_processes 1; # cpu of your server | |
| error_log /var/log/nginx/error.log warn; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # close iptables | |
| service iptables stop | |
| # prevent iptables restart on boot | |
| chkconfig iptables off | |
| # stop firewall | |
| systemctl stop firewalld.service | |
| # prevent firewall restart on boot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo root:pass |sudo chpasswd root | |
| sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config; | |
| sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config; | |
| sudo service sshd restart | |
| # username: root | |
| # password: pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| location / { | |
| # if you index.js is listening on port 3000 | |
| # or for location | |
| # proxy_pass http://0.0.0.0:3000 | |
| proxy_pass http://127.0.0.1:3000 | |
| } | |
| } |