Skip to content

Instantly share code, notes, and snippets.

@dennbagas
Last active September 17, 2019 11:14
Show Gist options
  • Save dennbagas/67a37609ac203190da3c77d6e5f27a27 to your computer and use it in GitHub Desktop.
Save dennbagas/67a37609ac203190da3c77d6e5f27a27 to your computer and use it in GitHub Desktop.
Membuat weather API dengan Node.js
var express = require('express');
const bodyParser = require('body-parser');
const cors = require('cors');
var app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cors());
app.get('/', function (req, res) {
res.send('Hello World!');
});
app.listen(4000, function () {
console.log('Example app listening on port 4000!');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment