Openwisp wifi login pages app to allow users to authenticate, sign up and know more about the WiFi service they are using.
Want to help OpenWISP? Find out how to help us grow here
git clone https://github.com/openwisp/openwisp-wifi-login-pages.git
npm install
or
yarn
npm update
or
yarn upgrade
Run $ npm run add-org
When you run this command you’re prompted to provide the following properties:
Property | Description |
---|---|
name | Required. Name of the organization.` |
slug | Required. Slug of the organization. |
uuid | Required. UUID of the organization. |
secret_key | Required. Token of the organization. |
Copy all the assets to client/assets/{slug}
directory
Run $ npm run setup
Start servers using $ npm run start
List of NPM Commands:
$ npm run start # Run the app (runs both, client and server)
$ npm run setup # Discover Organization configs and generate config.json and asset directories
$ npm run add-org # Add new Organization configuration
$ npm run build # Build the app
$ npm run server # Run server
$ npm run client # Run client
$ npm run coveralls # Run coveralls
$ npm run lint # Run ESLint
$ npm run lint:fix # Run ESLint with automatically fix problems option
$ npm test # Run tests
$ npm test -- -u # Update Jest Snapshots
To start the client and/or server on a port of your liking, you must set environment variables before starting.
To run the client on port 4000 and the server on port 5000, use the following command:
Bash (Linux):
$ CLIENT=4000 SERVER=5000 npm run start
Powershell (Windows):
PS> $env:CLIENT = 4000; $env:SERVER = 5000; npm run start
You can also run the client and server commands separately:
Bash (Linux):
$ SERVER=5000 npm run server
$ CLIENT=4000 SERVER=5000 npm run client
Powershell (Windows):
PS> $env:SERVER = 5000; npm run server
PS> $env:CLIENT = 4000; $env:SERVER = 5000; npm run client
Note that you need to tell the client the server's port (unless you're using the default server port, which is 3030) so the client knows where he can find the server.
See LICENSE.