Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xdtianyu/momentsserver
MomentsServer is server side of Moments, it's still under development.
https://github.com/xdtianyu/momentsserver
Last synced: about 1 month ago
JSON representation
MomentsServer is server side of Moments, it's still under development.
- Host: GitHub
- URL: https://github.com/xdtianyu/momentsserver
- Owner: xdtianyu
- License: gpl-3.0
- Created: 2015-10-31T04:53:02.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-03T01:36:55.000Z (about 9 years ago)
- Last Synced: 2023-04-01T07:51:22.098Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 180 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MomentsServer
[MomentsServer](https://github.com/xdtianyu/MomentsServer) is server side of [Moments](https://github.com/xdtianyu/Moments), it's still under development.Dependencies
-------pip3 install PyMySQL
pip3 install flask
pip3 install Flask-SQLAlchemy**Create mysql database and import test data**
1\. Login to your MYSQL console.
mysql -uroot -p
2\. Create `moments` database
CREATE DATABASE moments DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
3\. Import test data
use moments;
source sql/moments.sql;Deployment
-------1\. Using `python3` command line
Run `python3 server.py` and it's be deployed at `http://$YOUR_SERVER_IP$:5000`
2\. I suggest that you should use `uwsgi` and `nginx`
apt-get install uwsgi uwsgi-plugin-python3
cp uwsgi.ini /etc/uwsgi/apps-available/moments.ini
cd /etc/uwsgi/apps-enabled
ln -s ../apps-available/moments.ini
service uwsgi restartDefault `chdir` in `moments.ini` is `/opt/MomentsServer`, change this to your clone path.
Add the following lines to your nginx site config
```
location / {
try_files $uri @moments;
}location @moments {
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/app/moments/socket;
}
```LICENSE
-------```
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
```