https://github.com/sanogotech/nodejsloopbacksample
REST API With Loopback NodeJS Framework
https://github.com/sanogotech/nodejsloopbacksample
Last synced: 2 months ago
JSON representation
REST API With Loopback NodeJS Framework
- Host: GitHub
- URL: https://github.com/sanogotech/nodejsloopbacksample
- Owner: sanogotech
- Created: 2019-11-04T11:11:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T00:45:14.000Z (over 2 years ago)
- Last Synced: 2025-02-09T00:16:55.321Z (4 months ago)
- Language: TypeScript
- Size: 938 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nodejsLoopbackSample
REST API With Loopback NodeJS Framework# Direct: Start Project /start the application using:
$ npm startVisit http://127.0.0.1:3000/hello to see Hello world!
#-------- Steps End to End ------------------
## Step 1 / Install Node.jshttps://nodejs.org/en/download/
## Step 2 / Install LoopBack 4 CLI:
$ npm install --no-optional -g @loopback/cli
## Step 3 /Create a new project and Answer the prompts as follows:
$ lb4 app
## SteP4 / Starting the project
$ npm start
In a browser, visit http://127.0.0.1:3000/ping## Step 5 /Add your own controller :
$ lb4 controller
- Paste the following contents into the file /src/controllers/hello.controller.tsimport {get} from '@loopback/rest';
export class HelloController {
@get('/hello')
hello(): string {
return 'Hello world!';
}
}## Step 6 /Test your application:
start the application using:
$ npm startVisit http://127.0.0.1:3000/hello to see Hello world!