词汇:in
prep. 在…之内;从事于;按照(表示方式)
相关场景
- We're not gonna change that for this little example, but now let's check in that PWA files, and then let's deploy to production one more time. and as you can see, look in the top right corner, when I reload it, we now have that little install icon in Chrome. and if I click that little install icon, I'm gonna get this prompt, and boom! I have a PWA running in production for my Rails application.>> Rails 8.0.1 You are in good company
- And it's gonna refer to an icon, by default,we just have a nice red dot.but you should obviously replace that with your application. And if I hop in and have a look at the service worker, it is sort of already set up for doing we push,just as an example here, having some listeners, you can tweak that as you see fit.
它将指向一个图标,默认情况下,我们只有一个漂亮的红点。但你显然应该用你的应用程序替换它。如果我跳进去看看服务工作者,它已经为我们推送做了准备,就像这里的一个例子,有一些监听器,你可以根据需要进行调整。>> Rails 8.0.1 You are in good company- We're gonna turn the manifest on in our route file as well. There are basically two lines here as you can see, there's a manifest, and there's a service worker that you can use for your PWA.>> Rails 8.0.1 You are in good company
- we're gonna create a link reference here to manifest just exists here as a comment that you can reference. We're gonna turn the manifest on in our route file as well.>> Rails 8.0.1 You are in good company
- we are in with production authentication for the entire system. all right one last thing, let me show how to turn this web application into a PWA as well.>> Rails 8.0.1 You are in good company
- SO now, we're created that user in production using our Kamal consol! I can log in with that user/pasword.>> Rails 8.0.1 You are in good company
- So, be careful when you create things, that are gonna be created on the server side in your real database.The database, by the way? we haven't talked much about that, and that is because we're using SQLite. So, there is nothing to configure,there's nothing to set up, SQLite is now a suitable database for production with Rails. we have tuned it with all the right pragmas,to run SQLite well in production, you of course still need to set up a way to back that up, but everything else is preconfigured for you.>> Rails 8.0.1 You are in good company
- Kamal console:
- Kamal also gives you a way to start a console on the server side that is just like the console I showed you earlier that ran in development! You can see here, it reminds you that you are in production.>> Rails 8.0.1 You are in good company
- Because we had not run our DB seeds! Now, I could run DB seed in production, but let me show you another way doing it .>> Rails 8.0.1 You are in good company
- As we edit a new dependency, we can hop back in ,reload, and now we're good to go here. as you can see, I first tried to put in a wrong password, we're gonna get this screen, try another email address or password.>> Rails 8.0.1 You are in good company
- Now, if we hop back onto local host, and we try to log in with first the wrong password. we're actually gonna see something here , when I added the authentication, it added another gem, it added bcrypt, that's what we're using to keep password secure, so we have to hop back in here and restart our development server!>> Rails 8.0.1 You are in good company
- If we hop to the session, you can see it just is very basic Rails active record. Now we're gonna set up a default user that the systems should have as we're working with it to allow us to log in since we don't have that signup flow.>> Rails 8.0.1 You are in good company
- And then, we are going to hop in here and have a look at what was actually generated. We have the sessions controller, that's probably the most important. You can see here, it allows unauthenticated access to just new and create.>> Rails 8.0.1 You are in good company
- rails g authentication:
- Now, let's add authentication to things as well. Authentication is one of the newer feature in Rails, it basically gives you a default setup for tracking sessions, tracking passwords, and even doing password resets.>> Rails 8.0.1 You are in good company
- Common system is of course these as well, let's add one of those comments, and now we have the entire application running in production, wasn't that easy?>> Rails 8.0.1 You are in good company
- If we go back here and reload not in production, boom! We are live in production with our whole setup, everything is working, we can upload the active storage files directly to it.>> Rails 8.0.1 You are in good company
- And that's basically the rhythm you will be in when you're working on a Rails and application and you're deploying to production.>> Rails 8.0.1 You are in good company
- We can save that, check in that save change, and then we can run Kamal deploy again! gcam 'Set root to app';kamal deploy;>> Rails 8.0.1 You are in good company
- So in production, you actually need to manually specify the route. So we can go down here, and uncomment this, that sets what the route is going to be, we're just gonna point it to post stud index.>> Rails 8.0.1 You are in good company
- There was a 404 here! That's because if we go back to out route file, I have not defined route! And in production, you're not gonna get that screen we saw with the Rails version and the Ruby version, that is only for development.>> Rails 8.0.1 You are in good company
- Now, we can hop back in here and go to alphaexitsoftware.io and see....whoops!>> Rails 8.0.1 You are in good company
- And it will deploy it, push it out, do it in a red green deployment or blue green deployment such that there is no gap in that deployment as you set things up.>> Rails 8.0.1 You are in good company
- kamal setup:
- But this is all we basically need, we are now ready to check in the entire project into Git! Kamal uses Git for keeping track of versions, and we can now run Kamal setup!>> Rails 8.0.1 You are in good company
- I've directed them to keep looking at the individual who rented the truck to explode, that exploded in Las Vegas, also served as active duty U.S. Army.
我已经指示他们继续关注租用卡车爆炸的人,那辆卡车在拉斯维加斯爆炸,也曾是美国现役陆军。>> 56-Faster Than Sound!- They assess he had a remote detonator in his vehicle to set off those two ice chests.
他们评估说,他的车里有一个远程引爆器,可以引爆这两个冰柜。>> 56-Faster Than Sound!