Closed faridraad closed 4 years ago
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
On Mon, Dec 23, 2019 at 2:48 PM Farbod Samsamipour notifications@github.com wrote:
سلام روزبخیر اگر امکان داره نمونه کدی که در اون به این مشکل برخوردید رو بصورت کاملتری ارسال کنید عالی میشه تا من بتونم شرایطی که در اون به خطا خوردید رو شبیهسازی کنم. برای مثال یک فایل html که راهاندازی چابک رو انجام دادید و به این خطا خورده. پیشنهاد میکنم راهاندازی چابک در پروژه نمونه https://github.com/chabok-io/chabok-client-js/blob/master/sample/index.html#L121-L157 رو بررسی کنید. ممنون
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chabok-io/chabok-client-js/issues/3?email_source=notifications&email_token=ABPG5QDE53357WMXD5XCN5DQ2CNAXA5CNFSM4J6QOCPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHQ5BWQ#issuecomment-568447194, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPG5QHS5LCZL6YC6FFCIHDQ2CNAXANCNFSM4J6QOCPA .
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="https://unpkg.com/chabokpush@1.6.0/dist/chabokpush.min.js"></script>
<!-- <script src="ChabokSDKWorker.js"></script> -->
<script type="text/javascript">
const auth = {
appId: 'chabok-starter',
webKey: '1b98c60220b7e07c76142ea0635f69fb0dba5d7d',
devMode: true
}
const options = {
webpush: {
enabled: true,
publicKey: 'BLbNRYGZ39Qx-qYrlenpoWArW4zNR6A5XG9ch0VrA8YbJDWMJeWV0hK25Qt75NMrjgP_GG07TBnJ8gNPnVPGkyg'
},
silent: false,
realtime: false
};
const chabok = new chabokpush.Chabok(auth, options);
chabok.registerAsGuest();
</script>
</head>
<body>
</body>
</html>
صفحه ساده Html هیچ پروژه خاصی نیست به شما خطا نداد؟
On Tue, Dec 24, 2019 at 2:22 PM Farbod Samsamipour notifications@github.com wrote:
سلام روز بخیر قطعه کدی که فرستادید بدون مشکل اجرا شد. برای راهاندازی چابک از کلیدهای پروژه نمونه استفاده شده.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chabok-io/chabok-client-js/issues/3?email_source=notifications&email_token=ABPG5QGAJG3BMRYH2742J6LQ2HSVHA5CNFSM4J6QOCPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHTAK4A#issuecomment-568722800, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPG5QFM6Z44YJSW5PDU52TQ2HSVHANCNFSM4J6QOCPA .
sudo npm install -g serve
serve
localhost:5000
سلام در راه اندازی وب پوش با این خطا مواجه میشوم chabokpush.Chabok is not a constructor
لازم به ذکره که محیط تستی است قطعه کدی که اضافه کردم اینه
const auth = { appId: '9a', webKey: '7ba', devMode: true } const options = { webpush: { enabled: true, publicKey: 'BKm***' }, silent: false, realtime: false }; const chabok = new chabokpush.Chabok(auth, options);