Archived
prod test
This commit is contained in:
@@ -97,5 +97,8 @@ low(new FileAsync(__dirname + '/db.json')) // production
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
app.use(express.static(__dirname + '/build')); // serve static build site
|
app.use(express.static(__dirname + '/build')); // serve static build site
|
||||||
|
app.get('*', (req,res) =>{
|
||||||
|
res.sendFile(__dirname+'/build/index.html');
|
||||||
|
});
|
||||||
app.listen(8000, () => console.log('listen on 8000')); // bind to port 8000 as required from specs
|
app.listen(8000, () => console.log('listen on 8000')); // bind to port 8000 as required from specs
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-2
@@ -193,8 +193,7 @@ class Wikipedia extends Component {
|
|||||||
}
|
}
|
||||||
return new Promise ((resolve,reject) => {
|
return new Promise ((resolve,reject) => {
|
||||||
timerId1 = window.setInterval(()=>{
|
timerId1 = window.setInterval(()=>{
|
||||||
if(this.state.wikipedia
|
if((this.state.wikipedia !== 'undefined') && (this.state.wikidataQ !== 'undefined') && (this.state.wikidata !== 'undefined'))
|
||||||
&& this.state.wikidataQ && this.state.wikidata)
|
|
||||||
resolve({
|
resolve({
|
||||||
artist: this.state.wikipedia.info.artist.toString(),
|
artist: this.state.wikipedia.info.artist.toString(),
|
||||||
genre: this.state.wikidataQ[this.state.wikidata.claims["P136"][0].mainsnak.datavalue.value.id].labels.en.value.toString()
|
genre: this.state.wikidataQ[this.state.wikidata.claims["P136"][0].mainsnak.datavalue.value.id].labels.en.value.toString()
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import React from 'react';
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { Col, Media } from 'react-bootstrap';
|
import { Col, Media } from 'react-bootstrap';
|
||||||
import { reject } from 'q';
|
|
||||||
|
|
||||||
class similarityArtist extends React.Component {
|
class similarityArtist extends React.Component {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user