sheetjs/demos/server/nest.sh

25 lines
518 B
Bash
Raw Normal View History

2022-02-26 05:48:40 +00:00
#!/bin/bash
# it is assumed that @nestjs/cli is installed globally
if [ ! -e xlsx-demo ]; then
nest new -p npm xlsx-demo
fi
cd xlsx-demo
2022-04-14 07:27:38 +00:00
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
2022-02-26 05:48:40 +00:00
npm i --save-dev @types/multer
if [ ! -e src/sheetjs/sheetjs.module.ts ]; then
nest generate module sheetjs
fi
if [ ! -e src/sheetjs/sheetjs.controller.ts ]; then
nest generate controller sheetjs
fi
cp ../sheetjs.module.ts src/sheetjs/
cp ../sheetjs.controller.ts src/sheetjs/
mkdir -p upload
npm run start