Closed zetekla closed 7 years ago
Hello, @zetekla.
That's because you're in development, so aliv
will take care of the static stuff. Once you're in production, the sendIndex
method will be called.
I cloned your repo and saw that there's no .alivrc
file - that's what's causing the issue. If you create such file in the root of your app, and add the following content:
{
"quiet": true,
"port": 3000,
"http2": true,
"pathIndex": "client/dev",
"only": [
"client/dev/**/*"
],
"static": [
"node_modules",
"jspm_packages"
],
"proxy": true,
"proxyWhen": "/api/*",
"proxyTarget": "https://localhost:3333"
}
It'll work just fine.
Also, the file .yo-rc.json
is missing. That'll cause a bunch of errors when using the subgenerators. Based on your choices, it'd look like this:
{
"generator-ng-fullstack": {
"appName": "identillect-fullstack",
"username": "pristinetran",
"userEmail": "< YOUR_EMAIL_GOES_HERE >",
"stack": "fullstack",
"repoHostUrl": "bitbucket.org",
"userNameSpace": "pristinetran",
"client": "ng2",
"stylePreprocessor": "sass",
"server": "node",
"nodeWebFrameworkServer": "express",
"transpilerServer": "typescript",
"secure": true,
"testsSeparated": false,
"differentStaticServer": false
}
}
Just copy this content and add .yo-rc.json
also in the root of your app.
I hope that helps!
TypeScript HTML SCSS Router Client Tests | Jasmine / Mocha MongoDB Auth | Y
vcs at https://github.com/zetekla/mean2fullstack
Unable to kickstart the app using
npm run dev
, the method SendIndex in StaticDispatcher class is not invoked. It could be a stream problem, Gulp finished the tasks earlier than invoking SendIndex (stream >> Promise issue).Result in: Error: ENOENT: no such file or directory, open '/Users/pristinetran/phuc/test/mean2-fullstack/index.html'
This line is not displayed in the console. https://github.com/zetekla/mean2fullstack/blob/master/server/commons/static/index.ts#L15