https://github.com/samuelmarks/captivote-rest-api
Captivote [Node.js] rest-api
https://github.com/samuelmarks/captivote-rest-api
Last synced: 2 months ago
JSON representation
Captivote [Node.js] rest-api
- Host: GitHub
- URL: https://github.com/samuelmarks/captivote-rest-api
- Owner: SamuelMarks
- Created: 2018-06-23T11:45:19.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-23T11:54:03.000Z (about 8 years ago)
- Last Synced: 2025-03-23T01:27:55.500Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 54.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
captivote-rest-api
====================
Captivote [Node.js] rest-api created with [TypeORM](https://github.com/typeorm/typeorm) with [TypeScript](https://github.com/Microsoft/TypeScript) in Node.js ([restify](http://restify.com/)).
## Install prerequisites
### Node
0. node & npm (tested with node v8)
1. Run: `npm install -g typings typescript bunyan`
2. `cd` to directory you've cloned this repo into
3. Run: `typings install`
4. Run: `npm install`
### External
- Database, e.g.: Postgres. Set `RDBMS_URI` env var accordingly, e.g.: `postgres://username:password@hostname/database_name`. Modify [config.ts](https://github.com/SamuelMarks/captivote-rest-api/blob/master/config.ts) to use a different database.
- Redis. Set `REDIS_URL` env var accordingly; otherwise defaults are used.
- Set: `DEFAULT_ADMIN_EMAIL` and `DEFAULT_ADMIN_PASSWORD` env vars
## Compile+run app
tsc
node main.js
## Misc
### Cleanup compiled output
When not add *.js to `.gitignore`, clean out compiled js with this GNU findutils solution:
find -name '*.js.map' -type f -exec bash -c 'rm "${1}" "${1%????}"' bash {} \;
Or delete all '*.js' outside of `node_modules` with:
find \( -name node_modules -prune \) -o -name '*.js' -type f -exec rm {} \;find \( -name node_modules -prune \) -o -name '*.js' -type f -exec rm {} \;
More complicated solution handling "foo.ts" & "foo.js" without "foo.js.map" coming at some point.