the application that works well with this server as backend, please check it: App
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes servicing for the client.
- Node version > 9
- XAMPP or any alternative server that should be running mysql
-
Import
mini_tododb.sql
to the sql server. -
Clone the server
git clone https://github.com/miladvafaeifard/todos-server
- install dependencies
cd vue-todo
npm install
- Start the application
npm run serve
docker build -t myserver/todos-server .
docker pull mysql:5.7
docker run -d \
--name= mysql_db \
-p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=root
mysql
docker run -d \
-p 5000:5000 \
-e PORT=5000 \
-e HOST='172.17.0.2' \
-e USER='root' \
-e PASS='root' \
--link mysql_db:db \
--name=todos-backend \
myserver/todos-server
Note: for this host '172.17.0.2' received from docker inspect mysql_db | grep IPAddress
docker-compose build && docker-compose up -d
The semi-final step is to set mysql port to MYSQL_HOST in node.dockerfile
file by looking up in the command line:
docker inspect <todos-server mysql ID> | grep IPAddress
and the final step is to rerun only the way:
docker build -f node.dockerfile -t todos-server_node .
- Restify - The Restify framework used
- Fork it!
- Create your feature branch:
git checkout -b new-feature
- Commit your changes:
git commit -am 'Add some message'
- Push to the branch:
git push origin new-feature
- Submit a pull request :D
- Milad Vafaeifard - the github profile
This project is licensed under the MIT License.