Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tuoku/mswa
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tuoku/mswa
- Owner: tuoku
- Created: 2021-04-07T06:40:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-06T21:27:55.000Z (over 3 years ago)
- Last Synced: 2023-05-25T16:23:23.208Z (over 1 year ago)
- Language: JavaScript
- Size: 1.54 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Artster
Artster is a social platform, where users can share their art that they have worked hard on.
This was created as a project for Metropolias Web-teknologian peruskonseptit course
## Deployment
1. Clone repository by running `git clone https://github.com/tuoku/MSWA.git` command
2. Move **public** folder to a location of your choice.
3. Change the URL in **index.js** to an appropriate address.
4. Import SQL Dump to a SQL Server
5. Setup your **.env** file appropriately
6. Run `npm i` and `node app.js`## Example request
```javascript
const data = {"username": "tester", "password": "AAAA1234"};
const fetchOptions = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: data,
};
const response = await fetch(url + '/auth/login', fetchOptions);
const json = await response.json();
```
You receive user object from database and a token
```javascript
"user": {
"id": 35,
"username": "tester",
"isAdmin": {
"type": "Buffer",
"data": [
0
]
},
"banned": {
"type": "Buffer",
"data": [
0
]
},
"email": "[email protected]",
"profileFilename": "placeholder",
"vst": "2021-04-30T08:53:52.000Z",
"vet": null
},
"token": "dfbgmkpdfgmpkfgdposdflUNi+0gfdgertrte.hfghfghhtrtAHFAF"
```## Dreamteam
**tuoku** https://github.com/tuoku \
**TheKents0209** https://github.com/TheKents0209 \
**ddiyar** https://github.com/ddiyar## License
[MIT](https://choosealicense.com/licenses/mit/)