Skip to content

Instantly share code, notes, and snippets.

View bishesh16's full-sized avatar

Bishesh Adhikari bishesh16

  • Amazon Web Services
  • London, UK
View GitHub Profile
// <ORACLIZE_API>
/*
Copyright (c) 2015-2016 Oraclize SRL
Copyright (c) 2016 Oraclize LTD
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
pragma solidity ^0.4.19;
import "./Oraclize.sol";
contract SimpleOraclizeContract is usingOraclize {
string public ETHXBT; // XBT is a synonym of BTC
event LogConstructorInitiated(string nextStep);
event LogPriceUpdated(string price);
event LogNewOraclizeQuery(string description);
var path = require("path"),
express = require("express");
var DIST_DIR = path.join(__dirname, "dist"),
PORT = 3000,
app = express();
//Serving the files on the dist folder
app.use(express.static(DIST_DIR));
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Simple Webpack App</title>
<script defer src="/bundle.js"></script>
</head>
<body>
<div id="hello"></div>
</body>
require('file-loader?name=[name].[ext]!./index.html');
import './css/style.css'
var hello = document.getElementById("hello");
hello.innerHTML = "Hello from Webpack!";
var webpack = require('webpack');
var config = {
context: __dirname + '/src', // `__dirname` is root of project and `/src` is source
entry: {
app: './main.js',
},
output: {
path: __dirname + '/dist', // `/dist` is the destination
filename: 'bundle.js', // bundle created by webpack it will contain all our app logic. we will link to this .js file from our html page.
@bishesh16
bishesh16 / package.json
Last active May 29, 2018 10:40
scripts for webpack 3
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack",
"build:prod": "webpack -p",
"start": "node server.js",
"dev": "webpack-dev-server"
}