Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d-koppenhagen/shopping-list
A shopping list
https://github.com/d-koppenhagen/shopping-list
Last synced: 3 days ago
JSON representation
A shopping list
- Host: GitHub
- URL: https://github.com/d-koppenhagen/shopping-list
- Owner: d-koppenhagen
- Created: 2015-06-24T06:58:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-27T19:17:02.000Z (about 9 years ago)
- Last Synced: 2024-10-11T06:11:48.730Z (about 1 month ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shopping-list
## About
This is a simple shopping list based on mongodb, angularJS and nodeJS## What you need
- [NodeJS](https://nodejs.org)
- [MongoDB](https://www.mongodb.org/) for the shopping list## How to setup
1. clone this project
2. go to `src` folder and run `npm install` (maybe you need to install also dependencies)
3. run the app with `node server.js`
4. open the url in your browser (http://localhost:5000)
5. create an init.d script to run the shopping-list as a service (Debian)
- edit the path after `APPLICATION_DIRECTORY` in the `shopping-list` file
- run `sudo ./createInitScript.sh`
- this will copy the file `shopping-list`to your `/etc/init.d` directory and make it excecutable
- now you can start the shopping-list with `sudo service shopping-list start` (there are also the options `restart`, `stop` and `status`)
6. (optional) you can configure ar `VirtualHost` for apache, etc. like that:
```ServerAdmin [email protected]
ServerName YOURSERVERNAME
ServerAlias shopping-list.YOURDOMAIN.comProxyRequests off
Order deny,allow
Allow from all
ProxyPass http://localhost:5000/
ProxyPassReverse http://localhost:5000/
```
## Configuration
- move file from the folder '/src/config.example.js' to '/src/config.js' and configure it## How it looks like?
- a preview of the project is available on: http://shop.d-koppenhagen.de/## API Methods
### GET (all items)
Request: `http://domain/list/`
Response:
```
{
"checked" : ,
"name" : ,
"quantity" : ,
"_id" :
}
```
### GET (specific item)Request: `http://domain/list/:id/`
Response:
```
{
"checked" : ,
"name" : ,
"quantity" : ,
"_id" :
}
```
### POSTRequest: `http://domain/list/`
HTTP-Body:
```
{
"checked" : ,
"name" : ,
"quantity" :
}
```
Response: `<"success"|"error">`### PUT
Request: `http://domain/list/:id`
HTTP-Body:
```
{
"checked" : ,
"name" : ,
"quantity" :
}
```
Response: `<"success"|"error">`### DELETE (specific item)
Request: `http://domain/list/:id`
Response: `<"success"|"error">`
### DELETE (all items)
Request: `http://domain/list/`
Response: `<"success"|"error">`