| title | ExpressJs server | |||||
|---|---|---|---|---|---|---|
| description | An express server with common examples | |||||
| tags |
|
This example starts an Express JS server.
- Install dependencies
npm install - Start the development server
npm run dev
The server started returns a plaintext message for the / route and a json message for the /json route.
The main application code is located in index.js.
you should read the comments in the code to understand what is happening. check out the expressjs documentation for more information. also, if this is your first time doing express, you should read the files in the order listed below.
srccontains the source code for the serversrc/routescontains the routes for the serversrc/routes/router_example.jscontains examples pertaining to expressjs routers