UNPKG

1.85 kBMarkdownView Raw
1[WIP] node-hotspot
2--------------
3
4[![npm version](https://badge.fury.io/js/node-hotspot.svg)](http://badge.fury.io/js/node-hotspot)
5
6
7Manage, Add & Remove infrastructure mode hotspots on Windows 7+ for [Node.js](http://nodejs.org) apps.
8
9Node-hotspot
10
11
12Installation
13-------
14
15```bash
16$ npm install node-hotspot --save
17```
18
19Code example
20-------
21
22```js
23var hotspot = require('node-hotspot');
24
25var opts = {
26 ssid: 'hotspot name',
27 password: '66ahhhs641jk',
28 force: true, // (optional) if hosting a network already turn it off and run ours.
29 adaptor: 'Ethernet' // (optional / false) name of adaptor to have ICS (Internet Connection Sharing) share internet from, passing false disables ICS all together - if non givin node-hotspot will attempt to find currently connected adaptor automatically
30};
31
32hotspot.enable(opts)
33 .then(function() {
34 console.log('Hotspot Enabled')
35 })
36 .catch(function(e) {
37 Console.log('Something went wrong; Perms?', e)
38 });
39
40hotspot.disable(opts)
41 .then(function() {
42 console.log('Hotspot disabled')
43 })
44 .catch(function(e) {
45 Console.log('Something went wrong; Perms?', e)
46 });
47
48hotspot.status(opts)
49 .then(function(status) {
50 console.log('Hotspot status: ' + status) //status contains clients object and state
51 });
52
53```
54
55Support
56-------
57
58If you're having any problem, please [raise an issue](https://github.com/luigiplr/node-hotspot/issues/new) on GitHub and I'll be happy to help.
59
60Contribute
61----------
62
63- Issue Tracker: [github.com/luigiplr/node-hotspot/issues](https://github.com/luigiplr/node-hotspot/issues)
64- Source Code: [github.com/luigiplr/node-hotspot](https://github.com/luigiplr/node-hotspot)
65
66
67
68License
69-------
70
71The project is licensed under the GPL-3.0 license.