diff --git a/.env.local.bak b/.env.local.bak
new file mode 100644
index 0000000..fe36869
--- /dev/null
+++ b/.env.local.bak
@@ -0,0 +1,3 @@
+API_URL=http://172.16.1.8:14009
+API_GRAPHQL_URI=http://172.16.1.8:14009/graphql
+BACKEND_SERVER_URI = http://172.16.1.8:14009
\ No newline at end of file
diff --git a/ecosystem.config.js b/ecosystem.config.js
new file mode 100644
index 0000000..4946f34
--- /dev/null
+++ b/ecosystem.config.js
@@ -0,0 +1,15 @@
+module.exports = {
+ apps: [
+ {
+ name: "tbg-company-ecomm",
+ script: "server.js",
+ time: true,
+ env: {
+ NODE_ENV: "development",
+ },
+ env_production: {
+ NODE_ENV: "production",
+ },
+ },
+ ],
+};
diff --git a/next.config.js b/next.config.js
index a2e764c..0666b61 100644
--- a/next.config.js
+++ b/next.config.js
@@ -3,15 +3,17 @@ const withImages = require("next-images");
const withSass = require("@zeit/next-sass");
const webpack = require("webpack");
const path = require("path");
-require('dotenv').config()
-module.exports = withPlugins([[withSass], [withImages]], {
- env: {
- API_URL: process.env.API_URL
- },
+// require("dotenv").config();
- webpack(config, options) {
- config.resolve.modules.push(path.resolve("./"));
- return config;
- }
-});
\ No newline at end of file
+module.exports = withPlugins([[withSass], [withImages]], {
+ // env: {
+ // API_URL: process.env.API_URL,
+ // },
+ trailingSlash: true,
+ webpack(config, options) {
+ config.resolve.modules.push(path.resolve("./"));
+ return config;
+ },
+ generateEtags: false,
+});
diff --git a/package.json b/package.json
index e1089fe..c41c9f2 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,6 @@
"apollo-upload-client": "^14.1.3",
"classnames": "2.2.6",
"cross-fetch": "^3.0.6",
- "dotenv": "^8.2.0",
"graphql": "^15.3.0",
"mdbreact": "^5.0.1",
"moment": "2.25.3",
diff --git a/pages/chart.js b/pages/chart.js
index ebb4836..d7ebe7c 100644
--- a/pages/chart.js
+++ b/pages/chart.js
@@ -12,9 +12,9 @@ import HeaderLinks from "components/Header/HeaderLinks.js";
import Footer from "components/Footer/Footer.js";
import GridContainer from "components/Grid/GridContainer.js";
import GridItem from "components/Grid/GridItem.js";
-import SectionChart from "pages-sections/Components-Sections/SectionChart.js";
+// import SectionChart from "pages-sections/Components-Sections/SectionChart.js";
import Parallax from "components/Parallax/Parallax.js";
-import styles from "assets/jss/nextjs-material-kit/pages/components.js";
+import styles from "../assets/jss/nextjs-material-kit/pages/components.js";
const useStyles = makeStyles(styles);
@@ -24,12 +24,12 @@ export default function Components(props) {
return (
}
+ rightLinks={}
fixed
color="info"
changeColorOnScroll={{
height: 400,
- color: "white"
+ color: "white",
}}
{...rest}
/>
@@ -48,7 +48,7 @@ export default function Components(props) {
-
+ {/* */}
diff --git a/pages/landing.js b/pages/landing.js
index 8e9d02d..02d07f9 100644
--- a/pages/landing.js
+++ b/pages/landing.js
@@ -18,9 +18,9 @@ import Parallax from "components/Parallax/Parallax.js";
import styles from "assets/jss/nextjs-material-kit/pages/landingPage.js";
// Sections for this page
-import ProductSection from "pages-sections/LandingPage-Sections/ProductSection.js";
-import TeamSection from "pages-sections/LandingPage-Sections/TeamSection.js";
-import WorkSection from "pages-sections/LandingPage-Sections/WorkSection.js";
+// import ProductSection from "pages-sections/LandingPage-Sections/ProductSection.js";
+// import TeamSection from "pages-sections/LandingPage-Sections/TeamSection.js";
+// import WorkSection from "pages-sections/LandingPage-Sections/WorkSection.js";
const dashboardRoutes = [];
@@ -39,7 +39,7 @@ export default function LandingPage(props) {
fixed
changeColorOnScroll={{
height: 400,
- color: "white"
+ color: "white",
}}
{...rest}
/>
@@ -71,9 +71,9 @@ export default function LandingPage(props) {
diff --git a/pages/service.js b/pages/service.js
index f49a433..468bcf1 100644
--- a/pages/service.js
+++ b/pages/service.js
@@ -12,7 +12,7 @@ import HeaderLinks from "components/Header/HeaderLinks.js";
import Footer from "components/Footer/Footer.js";
import GridContainer from "components/Grid/GridContainer.js";
import GridItem from "components/Grid/GridItem.js";
-import SectionService from "pages-sections/Components-Sections/SectionService.js";
+//import SectionService from "pages-sections/Components-Sections/SectionService.js";
import Parallax from "components/Parallax/Parallax.js";
import styles from "assets/jss/nextjs-material-kit/pages/components.js";
@@ -29,7 +29,7 @@ export default function Components(props) {
color="info"
changeColorOnScroll={{
height: 400,
- color: "white"
+ color: "white",
}}
{...rest}
/>
@@ -48,7 +48,7 @@ export default function Components(props) {
-
+ {/* */}
diff --git a/pages/simulasicicilan.js b/pages/simulasicicilan.js
index b8f00c7..6b984b7 100644
--- a/pages/simulasicicilan.js
+++ b/pages/simulasicicilan.js
@@ -12,7 +12,7 @@ import HeaderLinks from "components/Header/HeaderLinks.js";
import Footer from "components/Footer/Footer.js";
import GridContainer from "components/Grid/GridContainer.js";
import GridItem from "components/Grid/GridItem.js";
-import SectionSimulasiCicilan from "pages-sections/Components-Sections/SectionSimulasiCicilan.js";
+// import SectionSimulasiCicilan from "pages-sections/Components-Sections/SectionSimulasiCicilan.js";
import Parallax from "components/Parallax/Parallax.js";
import styles from "assets/jss/nextjs-material-kit/pages/components.js";
@@ -29,7 +29,7 @@ export default function Components(props) {
color="info"
changeColorOnScroll={{
height: 400,
- color: "white"
+ color: "white",
}}
{...rest}
/>
@@ -48,7 +48,7 @@ export default function Components(props) {
-
+ {/* */}
diff --git a/pages/testdrive.js b/pages/testdrive.js
index 65b9f38..4de9a67 100644
--- a/pages/testdrive.js
+++ b/pages/testdrive.js
@@ -12,7 +12,7 @@ import HeaderLinks from "components/Header/HeaderLinks.js";
import Footer from "components/Footer/Footer.js";
import GridContainer from "components/Grid/GridContainer.js";
import GridItem from "components/Grid/GridItem.js";
-import SectionTestDrive from "pages-sections/Components-Sections/SectionTestDrive.js";
+// import SectionTestDrive from "pages-sections/Components-Sections/SectionTestDrive.js";
import Parallax from "components/Parallax/Parallax.js";
import styles from "assets/jss/nextjs-material-kit/pages/components.js";
@@ -29,7 +29,7 @@ export default function Components(props) {
color="info"
changeColorOnScroll={{
height: 400,
- color: "white"
+ color: "white",
}}
{...rest}
/>
@@ -48,7 +48,7 @@ export default function Components(props) {
-
+ {/* */}
diff --git a/server.js b/server.js
new file mode 100644
index 0000000..ff4c424
--- /dev/null
+++ b/server.js
@@ -0,0 +1,20 @@
+const { createServer } = require("http");
+const { parse } = require("url");
+const next = require("next");
+
+const dev = process.env.NODE_ENV !== "production";
+const app = next({ dev });
+const handle = app.getRequestHandler();
+
+const port = process.env.PORT || "14009";
+
+app.prepare().then(() => {
+ createServer((req, res) => {
+ const parsedUrl = parse(req.url, true);
+ const { pathname, query } = parsedUrl;
+ app.render(req, res, "/", query);
+ }).listen(port, (err) => {
+ if (err) throw err;
+ console.log(`Ready on port ${port}`);
+ });
+});
diff --git a/yarn.lock b/yarn.lock
index 85d0ee1..10c9e73 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3681,7 +3681,7 @@ dot-prop@^5.2.0:
dependencies:
is-obj "^2.0.0"
-dotenv@^8.0.0, dotenv@^8.2.0:
+dotenv@^8.0.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a"
integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==