We are doing a web using HTML and JavaScript. We have some problems when trying to do the authorization process to connect to the Spotify API.
var express = require('express'); // Express web server framework
var request = require('request'); // "Request" library
var querystring = require('querystring');
var cookieParser = require('cookie-parser')
This code we found on the internet uses require()
to get some data but Chrome says:
Reference error: require is not defined.
We found that the JavaScript node may be the problem so we installed npm and Browserify but is not working.
We also used this in our HTML:
<script type="text/javascript" src="node.js"></script>
<script type="text/javascript" src="js/main.js"></script>
HELP??