watscho / express-mongodb-rest-api-boilerplate

A boilerplate for Node.js apps / Rest API / Authentication from scratch - express, mongodb (mongoose). Typescript
MIT License
619 stars 80 forks source link

hangs on yarn start? #36

Open adnan-smlatic opened 11 months ago

adnan-smlatic commented 11 months ago

i've tried running an instance of this locally and it just hangs on this? I have a redis and mongodb instance running, and there aren't any errors in the log file, did i miss something I'm supposed to do?

yarn start
yarn run v1.22.19
warning ../../package.json: No license field
$ npm run rm:public && cross-env NODE_ENV=production ts-node --files -r tsconfig-paths/register ./src

> express-mongodb-rest-api-boilerplate@1.0.3 rm:public
> rm -rf ./public
watscho commented 11 months ago

Hello, sorry for the late reply. Were you able to launch it? I use mac os and it runs without issues for me.

yarn install cp .env.example .env yarn start

http://localhost:8000/

adnan-smlatic commented 11 months ago

hey, i have not been able to get it to run at all, it always just hangs on what i pasted above

I am running redis locally, tried connecting to mongo locally and on atlas but neither seems to work, am I missing some step?

watscho commented 11 months ago

It seems to me that everything is starting up for you, and you just need to go to the link http://localhost:8000

LeonardoVenezia commented 6 months ago

Same issue here.

I solved it by changing

"start": "npm run rm:public && cross-env NODE_ENV=production ts-node --files -r tsconfig-paths/register ./src",

to

"start": "cross-env NODE_ENV=production ts-node --files -r tsconfig-paths/register ./src",

The terminal freezes at rm -rf ./public because there is no public folder in the project... I guess...

watscho commented 6 months ago

In theory, the terminal should not freeze for this reason. It probably depends on the operating system. In any case, everything works well for me.