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 LocationController = require('./controllers/LocationController') | |
const UserController = require('./controllers/UserController') | |
const routes = express.Router() | |
routes.post('/users', UserController.store) | |
module.exports = routes |
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 mongoose = require('mongoose') | |
const routes = require('./routes') | |
const server = express(); | |
mongoose.connect('mongodb://localhost/mydb', { useNewUrlParser: true }) | |
server.use(express.json()) | |
server.listen(3333); |
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
function nomeDaFuncao ([param] …) { | |
expressions | |
} |
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
function ([param] …) expression |
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
([param] …) => { | |
statements | |
} |
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 addressInput = document.querySelector('#address-input') | |
const ipInfoBtn = document.querySelector('#ip-info-btn') | |
const ipInfoField = document.querySelector('#ip-info') | |
ipInfoBtn.addEventListener('click', () => { | |
ipInfoField.innerHTML = '<img src="img/loading.gif">' | |
let address = addressInput.value | |
let url = `https://ipinfo.io/${address}/json` | |
fetch(url) |
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
<!--[if lt IE 9]> | |
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> |
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
<figure> | |
<img src="#" alt="#"> | |
<figcaption>Three Angels Dancing</figcaption> | |
</figure> |
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
<fig id=angelfig> | |
<figbody> | |
<artwork depth=24p> | |
<figcap>Three Angels Dancing | |
</fig> |
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
<fig id=angelfig> | |
<figbody> | |
<artwork depth=24p> | |
</artwork> | |
</figbody> | |
<figcap>Three Angels Dancing</figcap> | |
</fig> |
NewerOlder