This is a ReactJS based landing page. All 'visual' data can be easily modified by changing the data.json file.
You will need to have Node JS installed on your pc.
After cloning the files, you will have to run npm install
followed by npm start
in the CLI
Change the data in the data.json
file as well as add any images to public/img/
You can also change styles by modifying the public/css
files.
Node.js and npm should be installed on your machine.
You can create a new React app using create-react-app by running the following command in your terminal:
Copy code
npx create-react-app my-app
Replace my-app with the name of your app.
Navigate to the root directory of your app and run the following command to install the dependencies listed in your package.json file:
Copy code
npm install
To add Refine to your app, run the following command:
Copy code
npm install @pankod/refine-mui @pankod/refine-core @pankod/refine-react-router-v6 @pankod/refine-simple-rest @pankod/refine-inferencer @pankod/refine-react-hook-form --save
To use Material UI Icons in your app, run the following command:
Copy code
npm install @mui/icons-material --save
To use ApexCharts in your app, run the following command:
Copy code
npm install apexcharts react-apexcharts --save
To use Axios in your app, run the following command:
Copy code
npm install axios --save
To use dotenv in your app, run the following command:
Copy code
npm install dotenv --save
To use React Spinners in your app, run the following command:
Copy code
npm install react-spinners --save
To use Testing Libraries in your app, run the following command:
Copy code
npm install @testing-library/jest-dom @testing-library/react @testing-library/user-event --save-dev
To use TypeScript in your app, run the following command:
Copy code
npm install typescript @types/node @types/react @types/react-dom --save-dev
To start the app, run the following command:
Copy code
npm start
This will start the development server and your app should be accessible on http://localhost:3000.
That's it! You now have a basic React app set up with the listed dependencies. From here, you can start building your app by using the different libraries and tools you have installed.
Node.js and npm should be installed on your machine.
Create a new Node.js project by running the following command in your terminal:
perl Copy code
mkdir my-app
cd my-app
npm init -y
Replace my-app with the name of your app.
Navigate to the root directory of your app and run the following command to install the dependencies listed in your package.json file:
Copy code
npm install
To use Express in your app, run the following command:
Copy code
npm install express --save
To use Mongoose in your app, run the following command:
Copy code
npm install mongoose --save
To use dotenv in your app, run the following command:
Copy code
npm install dotenv --save
To use cors in your app, run the following command:
Copy code
npm install cors --save
To use Cloudinary in your app, run the following command:
Copy code
npm install cloudinary --save
To use nodemon in your app, run the following command:
Copy code
npm install nodemon --save-dev
Create a .env file in the root directory of your app and add your environment variables. For example:
makefile Copy code
PORT=5000
MONGODB_URI=mongodb://localhost/my-database
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret
Create a new file called app.js in the root directory of your app and add the following code:
Copy code
const express = require('express');
const cors = require('cors');
const mongoose = require('mongoose');
const cloudinary = require('cloudinary').v2;
require('dotenv').config();
const app = express();
// Middleware
app.use(cors());
app.use(express.json());
// Connect to database
mongoose.connect(process.env.MONGODB_URI, {
useNewUrlParser: true,
useUnifiedTopology: true,
});
mongoose.connection.on('error', err => {
console.error(`Error: ${err.message}`);
});
// Configure Cloudinary
cloudinary.config({
cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
api_key: process.env.CLOUDINARY_API_KEY,
api_secret: process.env.CLOUDINARY_API_SECRET,
});
// Routes
app.get('/', (req, res) => {
res.send('Hello, World!');
});
// Start server
const port = process.env.PORT || 5000;
app.listen(port, () => {
console.log(`Server listening on port ${port}`);
});
To start the app, run the following command:
Copy code
npm run dev
This will start the development server with nodemon, and your app should be accessible on http://localhost:5000.
That's it! You now have a basic Node.js app set up with the listed dependencies. From here, you can start building your app by using the different libraries and tools you have installed.