Skip to content

Commit

Permalink
added shared folder
Browse files Browse the repository at this point in the history
  • Loading branch information
RamanSharma100 committed Oct 17, 2022
1 parent 7735574 commit fc7eb9d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,9 @@ export default function Home({ profiles, filesData }) {
export async function getServerSideProps() {
// const profiles = await listReactFiles(__dirname + 'data/');
// console.log(__dirname);
const directoryPath = path.join(
getConfig().serverRuntimeConfig.PROJECT_ROOT,
process.env.NODE_ENV === 'production' ? '/shared/data' : '/shared/data'
);
const directoryPath =
process.env.NODE_ENV === 'production' ? '/shared/data' : '/shared/data';

const fileNames = [],
filesData = [];
const files = fs.readdirSync(directoryPath);
Expand Down

1 comment on commit fc7eb9d

@vercel
Copy link

@vercel vercel bot commented on fc7eb9d Oct 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

gdsclpu-tree – ./

gdsclpu-tree-git-main-gdsclpu.vercel.app
gdsclpu-tree.vercel.app
gdsclpu-tree-gdsclpu.vercel.app

Please sign in to comment.