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" | |
| services: | |
| db: | |
| image: mysql:lts | |
| volumes: | |
| - db_data:/var/lib/mysql | |
| restart: always |
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' | |
| volumes: | |
| mariadb: | |
| driver: local | |
| networks: | |
| db: | |
| driver: bridge |
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: "2" | |
| services: | |
| app: | |
| image: lebowvsky/cvonline | |
| stdin_open: true # docker run -i | |
| tty: true # docker run -t | |
| networks: | |
| - ubuntu_web | |
| labels: |
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: "2" | |
| services: | |
| app: | |
| image: lebowvsky/cvonline | |
| stdin_open: true # docker run -i | |
| tty: true # docker run -t | |
| ports: | |
| - 4000:3000 #Par example |
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
| class Person { | |
| private name: string; | |
| private age: number; | |
| constructor(name: string, age: number) { | |
| this.name = name; | |
| this.age = age; | |
| } | |
| tellMyName(): string { |
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
| import { cpus } from "os"; | |
| import chalk from "chalk"; | |
| console.log(chalk.red(JSON.stringify(cpus()))); |
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
| const request = require('request'); | |
| request('https://swapi.dev/api/people/1/', function (error, response, body) { | |
| console.error('error:', error); // Print the error if one occurred | |
| console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received | |
| const luke = JSON.parse(body); | |
| console.log(luke); | |
| request(luke.films[0], function (err, res, bod) { | |
| console.error('error:', err); // Print the error if one occurred | |
| console.log('statusCode:', res && res.statusCode); // Print the response status code if a response was received |
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
| const connection = require("./conf"); | |
| const express = require("express"); | |
| const app = express(); | |
| const port = 3000; | |
| app.get("/api/movies", (req, res) => { | |
| let sql = "SELECT * FROM movie"; | |
| let sqlValues = []; | |
| if (req.query.rating && req.query.genre) { |
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
| const connection = require('./conf'); | |
| const express = require('express'); | |
| const app = express(); | |
| const port = 3000; | |
| app.use(express.json()); | |
| app.use(express.urlencoded({extended: true})); | |
| app.get('/api/employees', (req, res) => { |
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
| const connection = require('./conf'); | |
| const express = require('express'); | |
| const app = express(); | |
| const port = 3000; | |
| app.use(express.json()); | |
| app.use(express.urlencoded({extended: true})); | |
| app.get('/api/employees', (req, res) => { |
NewerOlder