https://github.com/sheitak/node-express-env
Node.js and Express.js code repository, it contains several examples of possible data manipulations, especially with the Express.Js framework.
https://github.com/sheitak/node-express-env
Last synced: about 1 year ago
JSON representation
Node.js and Express.js code repository, it contains several examples of possible data manipulations, especially with the Express.Js framework.
- Host: GitHub
- URL: https://github.com/sheitak/node-express-env
- Owner: Sheitak
- Created: 2021-01-23T12:46:11.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-01T16:00:42.000Z (over 5 years ago)
- Last Synced: 2025-03-14T12:34:40.492Z (over 1 year ago)
- Language: JavaScript
- Size: 167 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

### Test and handling environment
__v.0.1.0__
Node.js and Express.js code repository, it contains several examples of possible data manipulations, especially with the Express.Js framework.
- **Getting started**
- **SQL data management**
- **Star-Trek : External API**
#### 1. Getting started
Clone the repository.
Use the `npm install` command.
Copy the `.env.sample` file to `.env` and replace the values ββto correctly connect your MySQL database and port.
The repository uses __nodemon__, so you can modify the __package.json__ in the script.
`"scripts": {
"start": "nodemon src/index.js"
},`
and replace `src/index.js` with `src/"Your JavaScript file name"` if you want use another startup file.
Launch `npm start`.
Very well ! You are ready to go to the various endpoints to manipulate the data.
#### 2. SQL data management
The index.js file shows an example of a REST API that uses the different routes types. Request/Responses are mainly done with a MySQL database. The sample SQL files are located in the data folder. __movies.js__ also provides a small, fast dataset.
#### 3. Star-Trek : External API
This section shows the manipulation of JavaScript object and data in JSON format related to an external API that lists the episodes of the Star-Trek series in the __startrek.json__ file.
The Challenge specific to this file is described right here.
**
More improvement to come.