Skip to content

Commit f31b2df

Browse files
committed
Enable Fastboot
1 parent b73b278 commit f31b2df

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

app/index.html

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@
1919
</head>
2020
<body>
2121
{{content-for 'body'}}
22-
<noscript>
23-
<div id="main">
24-
<div class='noscript'>
25-
This site requires JavaScript to be enabled.
26-
</div>
27-
</div>
28-
</noscript>
2922

3023
<script src="{{rootURL}}assets/vendor.js"></script>
3124
<script src="{{rootURL}}assets/cargo.js"></script>

config/environment.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ module.exports = function(environment) {
2222
// Here you can pass flags/options to your application instance
2323
// when it is created
2424
},
25+
fastboot: {
26+
hostWhitelist: [
27+
'crates.io',
28+
/^localhost:\d+$/,
29+
/\.herokuapp\.com$/
30+
],
31+
},
2532
};
2633

2734
if (environment === 'development') {

config/nginx.conf.erb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ http {
6464
proxy_pass http://app_server;
6565
}
6666

67+
# Just in case, only forward "/" to Ember for a moment
68+
location = / {
69+
proxy_pass http://localhost:9000;
70+
}
71+
6772
location ~ ^/api/v./crates/new$ {
6873
proxy_pass http://app_server;
6974

fastboot.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const FastBootAppServer = require('fastboot-app-server');
2+
3+
let server = new FastBootAppServer({
4+
distPath: 'dist',
5+
port: 9000
6+
});
7+
8+
server.start();

0 commit comments

Comments
 (0)