Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/patkub/hackstackapi
prototype :movie_camera: :dvd: :video_game: :cd:
https://github.com/patkub/hackstackapi
Last synced: 24 days ago
JSON representation
prototype :movie_camera: :dvd: :video_game: :cd:
- Host: GitHub
- URL: https://github.com/patkub/hackstackapi
- Owner: patkub
- License: gpl-3.0
- Created: 2020-04-09T18:42:46.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T02:00:47.000Z (almost 2 years ago)
- Last Synced: 2023-08-10T05:42:18.893Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 729 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# HackStackAPI
### UI
- [ ] Renting a movie
- [ ] Reserving a movie
- [ ] Adding a movie
- [x] Generating an inventory reportPulls movie data from [OMDb](https://www.omdbapi.com/) and [TMDb](https://www.themoviedb.org/), and game data from [GiantBomb](https://www.giantbomb.com/).
### Setup
```
yarn install
```### Run it!
```
node index.js
```### Babel Transpile ES6 (ES2015) to ES5
There are ES6 (ES2015) classes in `app/views/js/components`. In order for them to work on browsers that only support ES5 (ex. IE), they need to be transpiled with babel. This command will generate `app/views/js/components.js` which is included on every page.
```
yarn transpile
```Dependencies are defined in `index.js`. For example, bootstrap is under `/vendor/bootstrap/css/bootstrap.min.css`. App css and js are under `static/css/` and `static/js/` respectively.
### Hack Stack, LLC SSL
Generated SSL certificate using https://github.com/dakshshah96/local-cert-generator
Create root certificate:
```
sh createRootCA.sh
``````
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:New York
Locality Name (eg, city) []:Rochester
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Hack Stack, LLC
Organizational Unit Name (eg, section) []:Hack Stack, LLC
Common Name (e.g. server FQDN or YOUR name) []:localhost
Email Address []:
```Create domain certificate for localhost:
```
sh createSelfSigned.sh
```Edit `index.js` and set the paths to `server.key` and `server.crt`
```
.createServer(
{
key: fs.readFileSync("./local-cert-generator/server.key"),
cert: fs.readFileSync("./local-cert-generator/server.crt"),
passphrase: "12345",
},
app
)
```### Import the Certificate into Chrome
1. Go to `chrome://settings/certificates` > Authorities tab > Import `rootCA.pem`.
2. Trust this certificate for identifying websites.
3. Restart chrome.
4. Navigate to `https://localhost:3000/` and you should have a green lock.