1.0.2 • Published 1 month ago

@euc-development/shp-proxy v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 month ago

Info

This package was created for EUC Development team and contains a script with basic setup to run SharePoint proxy on localhost, so developers can access SharePoint resources during front-end development.

Installation

npm i @euc-development/shp-proxy

Setup

First add a new NPM script (proxy) to package.json and after that create the server.js file in the root of your project directory. Note: name of the script, name of the file and the location can be changed, just update the script afterwards.

"scripts": {
		"dev": "nuxt",
		"build": "nuxt build",
		"start": "nuxt start",
		"generate": "nuxt generate",
		"proxy": "node ./server.js",
		"create:migration": "node ./migrations.js --create"
	},

In the server.js file add the following. Import the runProxy function and call it. The only argument of this function is the port, which defaults to 8080 (omitted in the example).

runProxy = require("@euc-development/shp-proxy");

runProxy();

To start the proxy server, enter npm run proxy to the console.