This file contains 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 express = require('express') | |
const app = express() | |
app.get('/', (req, res) => { | |
res.send('Hello World') | |
}) | |
app.listen(3000, (err) => { | |
if (err) { | |
console.log("Error: ", err) |
This file contains 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') | |
const express = require('express') | |
const app = express() | |
app.get('/', (req, res) => { | |
if (!req.query.search) { | |
return res.send('Please provide a search string...') |
This file contains 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 url = 'http://api.fetchurl.com' | |
fetch(url).then((response) => { | |
response.json().then((data) => { | |
console.log(data) | |
}) | |
}) | |
// expected output: JSON Object |
This file contains 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 mongodb = require('mongodb') | |
const MongoClient = mongodb.MongoClient | |
const connectionURL = 'mongodb://127.0.0.1:27017' | |
const databaseName = 'customDatabaseName' | |
MongoClient.connect(connectionURL, { useNewUrlParser: true }, (error, client) => { | |
if (error) { | |
return console.log('Unable to connect to database!') | |
} |
This file contains 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
// CRUD create read update delete | |
const { MongoClient, ObjectID } = require('mongodb') | |
const connectionURL = 'mongodb://127.0.0.1:27017' | |
const databaseName = 'databaseName' | |
MongoClient.connect(connectionURL, { useNewUrlParser: true }, (error, client) => { | |
if (error) { |
This file contains 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
window.location.href.split(/[?#]/)[0] + '/' |
This file contains 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
var banner_bottom = '<div class="banner-bottom">'+ | |
' <div class="banner-bottom-content">'+ | |
' <span>Lorem Ipsum Dolor!</span>'+ | |
' <a class="c-btn" target="_blank" href="https://www.google.com" title="Click me">CLICK ME!</a>'+ | |
' </div>'+ | |
' <div class="banner-close">'+ | |
' x'+ | |
' </div>'+ | |
'</div>'; |
This file contains 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
.banner-bottom { | |
position: fixed; | |
left: 0px; | |
top: 0px; | |
height: 55px; | |
width: 100%; | |
color: #fff; | |
background: #001429; | |
z-index: 1333333337!important; | |
} |
OlderNewer