Commit f3d22b34 authored by alain's avatar alain 🐙
Browse files

build only in production env

parent 654469db
......@@ -5,4 +5,12 @@
* to customize this model
*/
module.exports = {};
module.exports = {
lifecycles: {
async afterUpdate() {
if(process.env.NODE_ENV === 'production') {
strapi.services.util.build()
}
},
},
};
......@@ -5,4 +5,12 @@
* to customize this model
*/
module.exports = {};
module.exports = {
lifecycles: {
async afterUpdate() {
if(process.env.NODE_ENV === 'production') {
strapi.services.util.build()
}
},
},
};
......@@ -8,9 +8,9 @@
module.exports = {
lifecycles: {
async afterUpdate() {
strapi.services.util.build()
if(process.env.NODE_ENV === 'production') {
strapi.services.util.build()
}
},
},
};
......@@ -5,4 +5,12 @@
* to customize this model
*/
module.exports = {};
module.exports = {
lifecycles: {
async afterUpdate() {
if(process.env.NODE_ENV === 'production') {
strapi.services.util.build()
}
},
},
};
......@@ -8,9 +8,9 @@
module.exports = {
lifecycles: {
async afterUpdate() {
strapi.services.util.build()
if(process.env.NODE_ENV === 'production') {
strapi.services.util.build()
}
},
},
};
......@@ -5,7 +5,7 @@
"description": "Strapi backend for publicstack.net",
"scripts": {
"develop": "strapi develop",
"start": "strapi start",
"start": "NODE_ENV=production strapi start",
"build": "strapi build",
"strapi": "strapi"
},
......
......@@ -8,14 +8,14 @@ const DomainsPage = ({ data }) => (
<Layout>
<SEO title="Domains" />
<h1>Domains</h1>
<ul>
<div className="items">
{ data.allStrapiDomain.nodes.map(node => (
<li key={node.id}>
<div key={node.id} className="item">
<h3>{ node.title }</h3>
<p>{ node.description }</p>
</li>
</div>
)) }
</ul>
</div>
</Layout>
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment