Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shanev/koa-ios-api
Self-hosted API server for iOS apps, with push notifications and user accounts.
https://github.com/shanev/koa-ios-api
api-server ios koa mongodb nodejs push-notifications
Last synced: 12 days ago
JSON representation
Self-hosted API server for iOS apps, with push notifications and user accounts.
- Host: GitHub
- URL: https://github.com/shanev/koa-ios-api
- Owner: shanev
- License: mit
- Created: 2017-12-30T19:36:31.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-01T13:15:02.000Z (about 7 years ago)
- Last Synced: 2024-11-24T10:26:33.616Z (2 months ago)
- Topics: api-server, ios, koa, mongodb, nodejs, push-notifications
- Language: JavaScript
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Koa iOS API
Barebones API server for iOS apps using ES2017 Javascript and best practices. Built on [Koa](http://koajs.com), the next-generation web framework for node.js. Fork it as a starting point for your own server.
Stack:
* MongoDB
* RedisFeatures:
* Authentication using JSON Web Tokens
* Push notifications using [node-apn](https://github.com/node-apn/node-apn)
* REST API
* User modelRequires node v7.6.0 or higher for async function support.
## Install
`git clone https://github.com/shanev/koa-ios-api && cd koa-ios-api`
`npm install`
Create a .env file with environment variables specific to your app:
```
APN_AUTH_KEYPATH=xxx
APN_KEY_ID=xxx
APN_TEAM_ID=xxx
JWT_SECRET=secret
MONGO_URL=mongodb://localhost/your-app-db
MONGOOSE_DEBUG=false
REDIS_URL=redis://localhost:6379
```## Run
Start MongoDB:
`npm run mongo`
Start Redis (optional):
`npm run redis`
Start Koa:
`npm start`
## Tests
`npm test`