Simple 5 minute command-line file / directory server built with connect, inspired by nodejitsu's http-server to show off the simplicity and flexibility of connect as a modular server.
Questions tagged [serve]
272 questions
1
vote
1 answer
Serve static javascript file from nextjs api
I need a route in website build with nextjs that sends javascript that can be used on different website to do some things.
I created new file in pages/api, let's call it sendTest.ts so it's location is pages/api/sendTest.ts. In the same folder I…

Neidd
- 61
- 6
1
vote
2 answers
I upgraded to Angular 13 and hot-reload stopped working with Nginx
I have an Angular application, and I just updated to Angular 13, but this problem also happens with new Angular 14 apps.
I used to serve my apps locally using ng serve --host 0.0.0.0 --disable-host-check
but for some reason, now the hot reload…

Danilo Bassi
- 119
- 1
- 1
- 9
1
vote
2 answers
Why am I not able to run ng serve inside workspace?
So basically if I type the command "ng serve" inside the terminal and inside the right workspace. (I also tried "sudo ng serve") I get the following error for some reason : Error: This command is not available when running the Angular CLI outside a…

Jarno Looij
- 29
- 1
- 6
1
vote
1 answer
Ionic: err: spawn UNKNOWN
When I try to run this command:
ionic serve --cordova --platform browser
I got this error msg:
Error: spawn UNKNOWN
at ChildProcess.spawn (internal/child_process.js:403:11)
at Object.spawn (child_process.js:553:9)
at spawn…

Patrik Ádám
- 11
- 2
1
vote
2 answers
How to run Codeigniter 4 without php spark serve
I do not use "php spark serve" command every time. Is it possible to us that without cmd command? I searched and found something. They are saying that move files from public directory to htdocs and change
$pathsConfig = FCPATH .…

Sinan Sarıkaya
- 21
- 1
- 4
1
vote
1 answer
Serve model using MLFlow from registry
I have been trying to serve a model using MLFlow to no avail. Here is what I'm doing:
Step 1: Run all data prep steps in my Jupyter notebook
Step 2: start an Anaconda command prompt and go the same directory of the notebook
Step 3: start mlflow as…

user1513335
- 71
- 4
1
vote
0 answers
Module not found error while trying to add custom headers using serve.js
React Static files Adding headers using serve.js
We have a React based SPA which is served using CMD ["serve", "-s", "./dist", "-p", "8080"] in Docker file.
Then there is a requirement to add CSP headers. We tried configuring an nginx server and…

kbvishnu
- 14,760
- 19
- 71
- 101
1
vote
1 answer
Index.html not loading when npx serve is run (caddy, nodejs)
I'm running fastify on node.js and using Caddy server for reverse proxying localhost to a domain (authsvc.dev) that serves up an index.html file in this UI project.
All was running fine until a couple days ago. Now, when I run npm run ui I get the…

briang
- 91
- 10
1
vote
1 answer
Nex.js static file serve with the extension without downloading
I need to serve the stellar.toml file in domain/.well-known/stellar.toml and the content type needs to be text/plain. I tried adding the next config like this and it works only if stellar file is saved without an extension.
I need to serve the…

A.S. SAMARASINGHE
- 215
- 1
- 12
1
vote
0 answers
process [kthreaddi] is consuming almost 100% CPU and high memory in ubuntu server
process [kthreaddi] is consuming almost 100% CPU and high usage of memory on ubuntu based server

Sam
- 56
- 5
1
vote
1 answer
Material UI Dialog not working in production - shows a blank page
I've installed serve and have run npm run build. When I start the application everything's working except the dialogs i.e. when I open them I get a blank white screen and an error:
react-dom.production.min.js:156 Uncaught TypeError: Cannot read…

DjangoDev1
- 232
- 4
- 14
1
vote
1 answer
Inside cache, offline.html is always React's index.html
I am caching an offline.html page. The cache is created properly and even an offline.html page is present inside the cache. Additionally, the build folder also has the right HTML file. However, the content of the offline.html is always React's…

AviatingFotographer
- 318
- 2
- 12
1
vote
0 answers
media file not serve in django with wihtenoise
Media files in Django are not visible and are not displayed.
I used WhiteNews. like this:
in wsgi.py i add this:
application = WhiteNoise(application, root=BASE_DIR / 'static')
application.add_files(BASE_DIR / 'media', prefix='mdeia/')
in…

Ammar Salahi
- 33
- 9
1
vote
0 answers
Default react project - ERROR BY SETTING HOMEPAGE- Uncaught SyntaxError: Unexpected token '<', i've read many answers none work
I'm only trying make a production build from the default react project and just by setting the homepage field in the package.json, when i run "serve -s build" on my local machine i get that error. I was getting this error in my main project, that it…

Marco Fernandes
- 29
- 4
1
vote
1 answer
npx serve is serving home directory instead of index.html
My Web App Service running on Linux serves a React App which is has its build files in wwwroot, served using a pm2 process that runs npx serve:
ecosystem.config.js
module.exports = {
apps: [
{
script: "npx serve -s",
},
],
};
This…

Qurillion
- 33
- 6