mirror of
https://github.com/jlengrand/soundcloud-web-component-application.git
synced 2026-03-10 08:41:23 +00:00
Add hot reloading to application using browser-sync
* Remove all the now unnecessary server code.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<link rel="import" href="../../../bower_components/polymer/polymer.html">
|
||||
<link rel="import" href="/polymer/polymer.html">
|
||||
|
||||
<dom-module id="sc-player">
|
||||
<template>
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<iframe
|
||||
width="100%"
|
||||
height="450"
|
||||
height="800"
|
||||
scrolling="no"
|
||||
frameborder="no"
|
||||
src="https://w.soundcloud.com/player/?url={{encodedPlaylistUrl}}&auto_play={{autoPlay}}&hide_related={{hideRelated}}&show_comments={{showComments}}&show_user={{showUser}}&show_reposts={{showReposts}}&visual={{visual}}">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<link rel="import" href="../../../bower_components/polymer/polymer.html">
|
||||
<link rel="import" href="/polymer/polymer.html">
|
||||
|
||||
<dom-module id="sc-profile">
|
||||
<template>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<link rel="import" href="../../../bower_components/polymer/polymer.html">
|
||||
<link rel="import" href="/polymer/polymer.html">
|
||||
|
||||
<dom-module id="sc-title">
|
||||
<template>
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
<meta charset="utf-8"/>
|
||||
<title>Soundcloud Playlist, featuring Polymer</title>
|
||||
</head>
|
||||
<script src="../bower_components/webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<link rel="import" href="../app/components/sc-title/sc-title.html">
|
||||
<link rel="import" href="../app/components/sc-profile/sc-profile.html">
|
||||
<link rel="import" href="../app/components/sc-player/sc-player.html">
|
||||
<link rel="import" href="components/sc-title/sc-title.html">
|
||||
<link rel="import" href="components/sc-profile/sc-profile.html">
|
||||
<link rel="import" href="components/sc-player/sc-player.html">
|
||||
|
||||
<body>
|
||||
<h1>PLOP</h1>
|
||||
<sc-title></sc-title>
|
||||
<sc-profile></sc-profile>
|
||||
<sc-player playlist-url="https://soundcloud.com/stuart-silva-322219159/sets/romantic-songs-mariela"></sc-player>
|
||||
|
||||
@@ -10,5 +10,8 @@
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
]
|
||||
],
|
||||
"devDependencies": {
|
||||
"webcomponentsjs": "^1.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,17 +3,15 @@
|
||||
"version": "1.0.0",
|
||||
"description": "A simple website with a soundcloud player, built using web components (polymer)",
|
||||
"private": true,
|
||||
"main": "server/app.js",
|
||||
"scripts": {
|
||||
"start": "nodemon -e .js,.html server/app.js",
|
||||
"start": "browser-sync start --server app -f app --serveStatic bower_components --no-notify",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "Julien Lengrand-Lambert <julien.lengrand-lambert@ing.nl>",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"nodemon": "^1.11.0"
|
||||
"browser-sync": "^2.18.12"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.15.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
var express = require("../node_modules/express");
|
||||
var app = express();
|
||||
var path = require("path");
|
||||
|
||||
app.get('/', function(req, res){
|
||||
res.sendFile(path.join(__dirname + '/../app/index.html'));
|
||||
});
|
||||
app.use(express.static(path.join(__dirname, '../')));
|
||||
|
||||
var http = require('http').Server(app);
|
||||
http.listen(8080);
|
||||
Reference in New Issue
Block a user