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

build only in production env

parent 654469db
...@@ -5,4 +5,12 @@ ...@@ -5,4 +5,12 @@
* to customize this model * 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 @@ ...@@ -5,4 +5,12 @@
* to customize this model * 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 @@ ...@@ -8,9 +8,9 @@
module.exports = { module.exports = {
lifecycles: { lifecycles: {
async afterUpdate() { async afterUpdate() {
if(process.env.NODE_ENV === 'production') {
strapi.services.util.build() strapi.services.util.build()
}
}, },
}, },
}; };
...@@ -5,4 +5,12 @@ ...@@ -5,4 +5,12 @@
* to customize this model * 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 @@ ...@@ -8,9 +8,9 @@
module.exports = { module.exports = {
lifecycles: { lifecycles: {
async afterUpdate() { async afterUpdate() {
if(process.env.NODE_ENV === 'production') {
strapi.services.util.build() strapi.services.util.build()
}
}, },
}, },
}; };
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"description": "Strapi backend for publicstack.net", "description": "Strapi backend for publicstack.net",
"scripts": { "scripts": {
"develop": "strapi develop", "develop": "strapi develop",
"start": "strapi start", "start": "NODE_ENV=production strapi start",
"build": "strapi build", "build": "strapi build",
"strapi": "strapi" "strapi": "strapi"
}, },
......
...@@ -8,14 +8,14 @@ const DomainsPage = ({ data }) => ( ...@@ -8,14 +8,14 @@ const DomainsPage = ({ data }) => (
<Layout> <Layout>
<SEO title="Domains" /> <SEO title="Domains" />
<h1>Domains</h1> <h1>Domains</h1>
<ul> <div className="items">
{ data.allStrapiDomain.nodes.map(node => ( { data.allStrapiDomain.nodes.map(node => (
<li key={node.id}> <div key={node.id} className="item">
<h3>{ node.title }</h3> <h3>{ node.title }</h3>
<p>{ node.description }</p> <p>{ node.description }</p>
</li> </div>
)) } )) }
</ul> </div>
</Layout> </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