Node SMS Gateway App provides an easy way to deploy SMS Gateway which includes terminal and gateway. Each terminal and gateway can be deployed in separate host.
Node SMS Gateway App is a pure SMS gateway implementation that doesn't requires or depends to any external SMS gateway service or library.
- Nodejs version 8.11.3 or higher. If you're using Linux box, use of NodeSource Node.js Binary Distribution is recommended.
- MySQL Server, using other database server is supported as long as Sequelize supports it.
- Supported hardwares, see https://github.com/tohenk/node-sms-terminal#hardware-support.
Installation is available using GIT.
cd ~
git clone https://github.com/tohenk/node-sms-gw.git
cd ~/node-sms-gw
npm install
MySQL must be already configured properly. Refer to MySQL documentation to do so.
cd ~/node-sms-gw
mysql -u root -p < docs/smsgw.sql
mysql -u root -p
mysql> grant all privileges on 'smsgw'.'*' to 'user'@'%' identified by 'password';
mysql> exit
Replace both
user
andpassword
with desired user and password.
If you're using Linux box, it is recommended to run services as separate user and give write access to required files and folders.
sudo adduser --system --no-create-home --disabled-login --group nodejs
cd ~/node-sms-gw
cp node_modules/@ntlab/sms-terminal/msgref.json .
sudo chown -vR nodejs config data logs sessions msgref.json
It is necessary to add nodejs
user to dialout
group to be able to use modem port.
sudo adduser nodejs dialout
To install Node SMS Terminal as service, follow this commands. Adjust the path as needed.
cd ~/node-sms-gw
vi service/linux/systemd/node-sms-terminal.service
sudo cp service/linux/systemd/node-sms-terminal.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable node-sms-terminal.service
And finally, to start Node SMS Terminal issue:
systemctl start node-sms-terminal
To install Node SMS Gateway as service, follow this commands. Adjust the path as needed.
cd ~/node-sms-gw
vi service/linux/systemd/node-sms-gateway.service
sudo cp service/linux/systemd/node-sms-gateway.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable node-sms-gateway.service
And finally, to start Node SMS Gateway issue:
systemctl start node-sms-gateway
Windows service functionality currently handled by
node-windows. To install
node-windows
follow this step:
cd path\to\node-sms-gw
npm install node-windows --global
npm link node-windows
Execute following commands in the Administrator Command Prompt:
cd path\to\node-sms-gw
node service\windows\terminal.js install
net start nodesmsterminal.exe
Execute following commands in the Administrator Command Prompt:
cd path\to\node-sms-gw
node service\windows\gateway.js install
net start nodesmsgateway.exe