# Node.jsのプロジェクトを管理したいディレクトリから
$ sap-cloud-sdk init chat-test
This folder does not contain a `package.json`.
Should a new `nest.js` project be initialized in this folder? (y|n): y
Building application scaffold... done
Enter project name (for use in manifest.yml) [chat-test]: chat-test
Do you want to provide anonymous usage analytics to help us improve the SDK? (y|n): n
Creating files
Modifying test config
Adding dependencies to package.json
Installing dependencies
Modifying `.gitignore`
+--------------------------------------------------------------+
Init finished successfully.
Next steps:
- Run the application locally (`npm run start:dev`)
- Deploy your application (`npm run deploy`)
Consider setting up Jenkins to continuously build your app.
Use `sap-cloud-sdk add-cx-server` to create the setup script.
+--------------------------------------------------------------+
# 何が作られたか確認
$ ls chat-test
credentials.json Jenkinsfile nest-cli.json package.json pipeline_config.yml s4hana_pipeline src test tsconfig.json
deployment manifest.yml node_modules package-lock.json README.md sap-cloud-sdk-analytics.json systems.json tsconfig.build.json
# プロジェクトディレクトリに移動
$ cd chat-test
# start:devを実行(package.jsonで定義)
$ npm run start:dev
"scripts": {
中略
"start": "nest start",
"start:dev": "nest start --watch",
import { Controller, Get } from '@nestjs/common';
@Controller()
export class TestController {
@Get('test')
getTest() {
return 'We will implement this in a minute.';
}
}
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { TestController } from './test.controller';
@Module({
imports: [],
controllers: [AppController, TestController],
providers: [AppService],
})
export class AppModule {}
$ sap-cloud-sdk package -v
4 packages are looking for funding
run `npm fund` for details
Overwrite deployment
Copying files
Install productive dependencies
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
32 | |
14 | |
13 | |
13 | |
11 | |
8 | |
8 | |
7 | |
7 | |
6 |