Skip to content

Asset Management / Inventory application for network gear

Notifications You must be signed in to change notification settings

jamesbtate/network-inventory

Repository files navigation

Asset Management / Inventory application for network gear
- MySQL (compatible) database
- Python3/Flask backend
- React frontend

Mostly followed the guide at [1] to setup webpack.

To setup DB:
Create database and user:
```
create database inventory;
create user inventory@localhost identified by 'yourpassword';
grant all on inventory.* to inventory@localhost;
flush privileges;
```
`mkdir instance`
edit instance/config.py
```
DB_DB = 'inventory'
DB_HOST = 'localhost'
DB_USER = 'inventory'
DB_PASS = 'yourpassword'
```
`mysql inventory -u inventory -p < schema.sql`

To setup build environment:
```
npm i webpack webpack-cli babel-core babel-loader babel-preset-env babel-preset-react -Dd
npm i react react-dom react-router-dom -S
pip3 install flask jinja2 mysql-connector
```

To build:
`npm run build`

To run flask dev server:
`./run_debug.bash`

[1] (https://medium.freecodecamp.org/part-1-react-app-from-scratch-using-webpack-4-562b1d231e75)

To compile/install npm in home directory on RHEL6:
```
wget http://nodejs.org/dist/node-latest.tar.gz
tar xzf node-latest.tar.gz
cd node-v*
yum install devtoolset-6-gcc-c++
scl enable devtoolset-6 bash
./configure --prefix=~/opt
make
make install
wget https://www.npmjs.org/install.sh -o npm_install.sh
bash npm_install.sh
```

About

Asset Management / Inventory application for network gear

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published