-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from austenstone/further
further
- Loading branch information
Showing
29 changed files
with
553 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,30 @@ | ||
# Backend Documentation | ||
# Backend | ||
|
||
## Overview | ||
This is the backend part of the fullstack application built with Node.js, TypeScript, and SQLite. The backend serves as the API for the frontend Angular application. | ||
|
||
## Project Structure | ||
- **src/**: Contains the source code for the backend. | ||
- **controllers/**: Handles incoming requests and responses. | ||
- **models/**: Defines data models for interacting with the SQLite database. | ||
- **routes/**: Sets up API routes and links them to controllers. | ||
- **services/**: Contains business logic and data access methods. | ||
- **app.ts**: Entry point for the Node.js backend, setting up the Express app. | ||
|
||
## Getting Started | ||
1. Clone the repository. | ||
2. Navigate to the backend directory. | ||
3. Install dependencies: | ||
``` | ||
npm install | ||
``` | ||
4. Start the server: | ||
``` | ||
npm start | ||
``` | ||
## Development | ||
```bash | ||
npm run dev | ||
``` | ||
|
||
## Database | ||
The backend uses SQLite for data storage. The database file is located in the `database/` directory. | ||
The backend uses a MySQL database to store data. | ||
|
||
## API Endpoints | ||
Refer to the routes defined in the `src/routes/index.ts` file for available API endpoints. | ||
You can run the docker compose file to start the database. Just shutdown the backend server so you can free up the port. | ||
|
||
You can also run it manually: | ||
```bash | ||
docker run -d \ | ||
--name db \ | ||
--restart always \ | ||
-e MYSQL_PASSWORD=octocat \ | ||
-e MYSQL_DATABASE=value \ | ||
-p 3306:3306 \ | ||
-v db:/var/lib/mysql \ | ||
-v ./db/init.sql:/docker-entrypoint-initdb.d/init.sql \ | ||
mysql | ||
``` | ||
|
||
## License | ||
This project is licensed under the MIT License. | ||
## API Endpoints | ||
Refer to the routes defined in the [`src/routes/index.ts`](./src/routes/index.ts) file for available API endpoints. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.