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
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.
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.
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.