Skip to content

Commit

Permalink
Adding Cosmic env settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mtermoul committed Mar 22, 2019
1 parent 6fbb25b commit d58d859
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 19 deletions.
Empty file added .env
Empty file.
3 changes: 3 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
COSMIC_BUCKET=col-admin
COSMIC_READ_KEY=PASTE-YOUR-API-KEY-HERE
COSMIC_WRITE_KEY=PASTE-YOUR-API-KEY-HERE
48 changes: 37 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,47 @@
# col-admin
# col-admin: Client side grid lookup app with Vue, Cosmic JS, and Vuetify

<img src="./images/main_screen_large.png" alt="Col-Admin Main Screen" />

# Links

<a href="#" target="_blank">Demo</a>

<a href="#" target="_blank">Tutorial article</a>

# Libraries

* Vue
* Vuex
* Vuetify
* Cosmic JS
* Moment JS

# Project setup

## Project setup
```
# install dependencies
npm install
```
### Compiles and hot-reloads for development
```
# compiles and hot-reloads for development
npm run serve
```
### Compiles and minifies for production
```
# compiles and minifies for production
npm run build
```
### Lints and fixes files
```
# configure env variables
rename .env.sample to .env and paste your API keys
# before you delploy to Cosmic
change you .env config
npm build
npm start
# if all works, then you can delpoy to Cosmic JS from the dashboard -> settings -> hosting
# Lints and fixes files
npm run lint
```

<img src="./images/main_screen_large.png" alt="Col-Admin Main Screen" />
Empty file added article/article.md
Empty file.
Binary file added article/images/main_screen_large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"server": "node server/index.js"
"server": "node server/index.js",
"start": "node server.js",
"heroku-postbuild": "npm run build"
},
"dependencies": {
"@babel/polyfill": "^7.0.0-rc.1",
"@vue/cli-plugin-babel": "^3.0.4",
"@vue/cli-plugin-eslint": "^3.0.4",
"@vue/cli-service": "^3.0.4",
"vue-cli-plugin-vuetify": "^0.2.1",
"vue-template-compiler": "^2.5.17",
"cosmicjs": "^3.2.15",
"moment": "^2.22.2",
"pg-restify": "^0.5.0",
Expand All @@ -22,13 +29,6 @@
"vuetify": "^1.2.0",
"vuex": "^3.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.0.4",
"@vue/cli-plugin-eslint": "^3.0.4",
"@vue/cli-service": "^3.0.4",
"vue-cli-plugin-vuetify": "^0.2.1",
"vue-template-compiler": "^2.5.17"
},
"eslintConfig": {
"root": true,
"env": {
Expand Down
11 changes: 11 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var express = require('express')
var serveStatic = require('serve-static')
require('dotenv').config()

var app = express()
app.use(serveStatic(__dirname + "/dist"))

var port = process.env.PORT || 5000
app.listen(port)

console.log('server started '+ port)

0 comments on commit d58d859

Please sign in to comment.