from aryan: most guides i found online weren't helpful for me, hope this helps tho :)
ssh root@<server-ip-address>Optional but recommended:
sudo apt update && sudo apt upgrade -yLet suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal and one bitbucket account, https://github.com/needu-mezino. Now i want to setup my system to easily talk to both the github accounts and bitbucket account.
NOTE: This logic can be extended to more than two accounts also. :)
The setup can be done in 5 easy steps:
| export GITHUB_USER=magickatt | |
| export GITHUB_TOKEN=secret | |
| export GITHUB_REPOSITORY=magickatt/ContainerisingLegacyApplicationsTalk | |
| git clone https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} |
| const express = require('express'); | |
| const app = express(); | |
| const PORT = process.env.PORT || 4001; | |
| app.listen(PORT, () => { | |
| console.log(`Server is listening on port ${PORT}`); | |
| }); | |
| const mountains = ['denali', 'olympus', 'kilimanjaro', 'matterhorn']; |
| const express = require('express'); | |
| const app = express(); | |
| const PORT = process.env.PORT || 4001; | |
| const puddingFlavors = ['chocolate', 'banana', 'butterscotch', 'pistachio']; | |
| const findPuddingIndex = (name) => { | |
| return puddingFlavors.indexOf(name); | |
| } |
| const express = require('express'); | |
| const app = express(); | |
| const PORT = process.env.PORT || 4001; | |
| const soups = ['gazpacho', 'borscht', 'primordial', 'avgolemono', 'laksa']; | |
| app.post('/soups', (req, res, next) => { | |
| const receivedData = req.query.name; | |
| soups.push(receivedData); |
| const express = require('express'); | |
| const app = express(); | |
| const PORT = process.env.PORT || 4001; | |
| const currencies = { | |
| diram: { | |
| countries: ['UAE', 'Morocco'], | |
| }, | |
| real: { |
| const express = require('express'); | |
| const app = express(); | |
| const PORT = process.env.PORT || 4001; | |
| const battlefields = { | |
| fortSumter: { | |
| state: 'SC', | |
| }, | |
| manassas: { |
| const express = require('express'); | |
| const app = express(); | |
| const PORT = process.env.PORT || 4001; | |
| const buildingMaterials = { | |
| wood: ['plywood', '2x4s', 'cedar shingles'], | |
| metal: ['steel girders', 'wall studs', 'rebar'], | |
| }; |
| const express = require('express'); | |
| const app = express(); | |
| const PORT = process.env.PORT || 4001; | |
| const sausageTypes = ['bratwurst', 'andouille', 'chorizo', 'boudin', 'kielbasa']; | |
| app.get('/sausages', (req, res, next) => { | |
| res.send(sausageTypes); | |
| }) |