Popup Builder
Click here to see a live demo in your device.
IMPORTANT:
Root folder contains the code for VueJS application. Also, it uses node-sass, which isn't compatible with with node-version higher than
14.x.x
It is recommended to use nodeJS version between10.x.x
&14.x.x
, before runningclient
.
/popup-src/
folder contains the backend code, which is only compatible with node-version higher than16.x.x
.
It is recommended to use nodeJS version higher than16.x.x
, before runningserver
.
You can use
NVM
to temporary change the nodeJS version
Project setup
npm install
Compiles and hot-reloads for development [FRONTEND]
npm run client
Run server for popupSDK [BACKEND]
npm run server
Compiles and minifies for production
npm run build
Display popup in any website:
- Make sure to run the server code locally:
npm run server
- Add this JavaScript line, change
pop_xxxxxxxxxxx
with actualpopup_id
:
<script src="http://localhost:3000/pixel.js?id=pop_xxxxxxxxxxx" async></script>
<!-- OR -->
<script src="https://popups-builder.herokuapp.com/pixel.js?id=pop_xxxxxxxxxxx" async></script>
<!-- If using the live version, first request might fail, because Heroku restarts the server sometime. In such a case, wait for two minutes and try hit again -->