feat: fix server

This commit is contained in:
cudr
2019-10-27 23:50:01 +03:00
parent 20f3c3234c
commit afaff1f80a
3 changed files with 19 additions and 4 deletions

View File

@@ -35,8 +35,13 @@ class Client extends Component<ClienProps> {
alpha: 1
})
const origin =
process.env.NODE_ENV === 'production'
? window.location.origin
: 'http://localhost:9000'
const options = {
url: `http://localhost:9000/${this.props.slug}`,
url: `${origin}/${this.props.slug}`,
connectOpts: {
query: {
name: this.props.name,