This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"scripts": { | |
... | |
"start": "node app.js" | |
}, | |
... | |
"engines": { | |
"node": "6.9.4", | |
"npm": "4.2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const app = express()app.use(express.static('./dist'));app.listen(process.config.PORT, function () { | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"dokku": { | |
"predeploy": "node prepare.js && ng build --aot --prod" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import config from './../config/config'; | |
import axios from 'axios'; | |
const authentication = { | |
login(email) | |
{ | |
return axios.get(config.url+config.bucket_slug+"/object-type/admins/search",{ | |
params:{ | |
metafield_key: 'email', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import config from './../config/config'; | |
import axios from 'axios'; | |
const newsData = { | |
// add news to Cosmic JS database | |
addnews(title, description, newsbody, date) | |
{ | |
return axios.post(config.url+config.bucket_slug+"/add-object/", { | |
title: title, slug: title, content: newsbody, type_slug: 'news', write_key: config.write_key, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"short_name": "PWA in Cosmic JS", | |
"name": "Progressive Web App in React & Cosmic JS", | |
"icons": [ | |
{ | |
"src": "chrome-touch-icon-192x192.png", | |
"sizes": "192x192", | |
"type": "image/png" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const app = express()app.use(express.static('./build'));app.listen(process.config.PORT, function () { | |
}); |