https://github.com/muchokidavid/bot-battlr-server
Project files for hosting web service server on render web hosting
https://github.com/muchokidavid/bot-battlr-server
javascript json json-server node-js render server
Last synced: about 2 months ago
JSON representation
Project files for hosting web service server on render web hosting
- Host: GitHub
- URL: https://github.com/muchokidavid/bot-battlr-server
- Owner: MuchokiDavid
- License: mit
- Created: 2023-11-18T07:54:06.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-18T07:58:57.000Z (over 2 years ago)
- Last Synced: 2025-01-05T19:26:34.386Z (over 1 year ago)
- Topics: javascript, json, json-server, node-js, render, server
- Language: JavaScript
- Homepage:
- Size: 1.72 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: READme.md
- License: LICENSE
Awesome Lists containing this project
README
# JSON Server
## Overview
This project sets up a simple JSON Server to serve as a mock API for your frontend development needs. With this project, you can easily simulate a backend server without the need for a full-fledged backend implementation.
The project is designed to be hosted on [Render](https://render.com/), a cloud platform that simplifies deployment and scaling.
## Getting Started
### Prerequisites
Make sure you have the following installed on your local machine:
- [Node.js](https://nodejs.org/)
- [npm](https://www.npmjs.com/)
### Installation
1. Clone this repository to your local machine:
```bash
git clone https://github.com/dmmuchoki7/bot-battlr-server.git
```
2. Navigate to the project directory:
```bash
cd bot-battlr-server
```
3. Install the project dependencies:
```bash
npm install
```
## Configuration
You can customize the JSON data by modifying the `db.json` file in the project root. Add your own JSON data to simulate different API endpoints.
## Usage
To start the JSON Server, run the following command:
```bash
npm start
```
This will start the server at `http://localhost:4000`.
## Deploying on Render
1. Create an account on [Render](https://render.com/) if you haven't already.
2. Click the "+" button on your Render dashboard to create a new service.
3. Choose the GitHub repository where you cloned this project.
4. Configure the following settings:
- **Environment**: Set NODE_ENV to production.
- **Build Command**: `npm install && npm run build`
- **Start Command**: `npm start`
5. Click "Create Web Service."
6. Render will automatically build and deploy your JSON Server. Once deployed, you can access your server at the provided URL.
## Contributing
If you have suggestions or improvements, feel free to open an issue or create a pull request.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Acknowledgments
- [JSON Server](https://github.com/typicode/json-server): The core JSON Server library.
- [Render](https://render.com/): Simplifying deployment and scaling.