parikhdhruv24791 / openwisp-wifi-login-pages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

openwisp-wifi-login-pages

Build Status Coverage Status Dependencies Status devDependencies Status

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


Table of contents

Prerequisites

Install

Clone this repo
git clone https://github.com/openwisp/openwisp-wifi-login-pages.git
Install dependencies
npm install

or

yarn
Update dependencies
npm update

or

yarn upgrade

Setup

Add Organization configuration

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

Usage

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

Using custom ports

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.

License

See LICENSE.

About

License:GNU General Public License v3.0


Languages

Language:JavaScript 85.6%Language:CSS 10.1%Language:Handlebars 4.1%Language:HTML 0.1%