Skip to content

Rajdeepc/node-on-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read Folders and Files of a project with react front end

A simple React App to demonstrate how to read your folders and their files from a front end library like React with using a backend Node layer. Here we have used preval.macro which creates a wrapper and server layer to create your own node module and read folders and files through it.

How it Works

Preval

Getting Started

To get you started you can simply clone the repository:

git clone https://github.com/Rajdeepc/read-file-from-react-withour-node.git

Prerequisites

You need git to clone the repository. You can get git from http://git-scm.com/.

A number of node.js tools is necessary to initialize and test the project. You must have node.js and its package manager (npm) installed. You can get them from http://nodejs.org/. The tools/modules used in this project are listed in package.json and include express, mongodb and mongoose.

Installing

and install the dependencies

npm install

Lint & Build

npm run lint
npm run build

Run in Local

To Run Locally Steps to follow:

npm start

Built With

Contributing

Create a branch

  1. git checkout master from any folder in your local https://github.com/Rajdeepc/read-file-from-react-withour-node.git repository
  2. git pull origin master to ensure you have the latest main code
  3. git checkout -b the-name-of-my-branch (replacing the-name-of-my-branch with a suitable name) to create a branch

Make the change

  1. Follow the "Running locally" instructions
  2. Save the files and check in the browser
  3. Changes to React components in src will hot-reload
  4. Changes to markdown files in content will hot-reload
  5. If working with plugins, you may need to remove the .cache directory and restart the server

Push it

  1. git add -A && git commit -m "My message" (replacing My message with a commit message, such as Fixed header logo) to stage and commit your changes
  2. git push my-fork-name the-name-of-my-branch
  3. Go to the ReadFilesFromReact and you should see recently pushed branches.
  4. Follow GitHub's instructions.
  5. If possible, include screenshots of visual changes. A Netlify build will also be automatically created once you make your PR so other people can see your change.

License

This project is licensed under the MIT License - see the LICENSE.md file for details