Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

companion code issue #80

Open
vinu123443 opened this issue Sep 12, 2018 · 6 comments
Open

companion code issue #80

vinu123443 opened this issue Sep 12, 2018 · 6 comments

Comments

@vinu123443
Copy link

vinu123443 commented Sep 12, 2018

hi

i am using this code to make companion on my server using this url
https://glitch.com/edit/#!/web-push-codelab?path=static/scripts/send-message.js:1:0

but on this point fetch function i got path error /api/send-push-msg so anybody explain me how i make this url.if anybody know please share companion full code

fetch('/api/send-push-msg', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      subscription: subscriptionObject,
      data: dataString,
      applicationKeys: {
        public: publicElement.textContent,
        private: privateElement.textContent,
      }
    })
  }
@gauntface
Copy link
Contributor

Can you please add what the actual error is that you are seeing.

@vinu123443
Copy link
Author

i am seeing this path issue /api/send-push-msg and if i carete this then what code we mention inside this .

@vinu123443
Copy link
Author

this is my live server where i place the code for companio https://cosmicbuildtech.co.in/code/assets/static/

@vinu123443
Copy link
Author

facing issue with this code when we place files on my server from this url below i send you my zip code .i am facing issue on send-message.js on this point

fetch('/api/send-push-msg', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
subscription: subscriptionObject,
data: dataString,
applicationKeys: {
public: publicElement.textContent,
private: privateElement.textContent,
}
})
}
code.zip

@vinu123443
Copy link
Author

what path i mention in place of this /api/send-push-msg

@marcoahp
Copy link

I have the same error with /api/send-push-msg

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants