https://docs.nestjs.com/#alternatives
$ git clone https://github.com/nestjs/typescript-starter.git project
$ cd project
$ npm install
$ npm run start:dev
$ git remote set-url origin https://github.com/youngkiu/nestjs-kakaologin.git
$ git branch -M main
$ git push -u origin main
$ npm install --save hbs
app.useStaticAssets(join(__dirname, '..', 'public'));
app.setBaseViewsDir(join(__dirname, '..', 'views'));
app.setViewEngine('hbs');
@Render('index') //index.hbs랑 연결
root() {
return {
data: {
title: 'Chattings',
copyright: 'ryu jun yeol',
},
};
}
<html>
<head>
<meta charset='utf-8' />
<link href='css/styles.css' rel='stylesheet' />
<title>{{data.title}}</title>
</head>
<body>
<h1>Hello World!</h1>
{{data.copyright}}
<script src='js/scripts.js'></script>
</body>
</html>
Ref)