zoukankan      html  css  js  c++  java
  • I want to make some notes

    Hi, guys, long time to not update my blog in 博客园,Now, I'm studying in Denmark, and worked part-time in a start-up. Everything is fine now. For everyday I touch new things in my work and study, I want record them in my blogs, because they are so easy to be forgotten. Meanwhile, I think it is very hard to insist if I cost several hours to do this thing, I don't want to give up after several days:) So, I decide just to take about half a hour a day to do this meaningful thing. It's cooool.

    Ok, I will start and most piece of words would be in English in order to help myself practice my English.

    deployment, CI/CD

    Many start-ups put their code repositories in github or gitlab, and when them push a new version to gitlab, they need a quick and robust tool to deploy the code to production environment (like amazon cloud). So this whole process is called Continuous integration and Continuous deployment. Jenkins is a good tool to do this job and have both windows and linux version.

    use jest to mock a file object or file-upload process

    In my company, I need using jest to test the server (using apollo server and graphql), but it's really hard to mock the file stuff. I search in goole, tried a lot of solution, and still can't find one that works.The thing is that the server side doesn't consider it is a file.. So I ask my question in StackOverflow https://stackoverflow.com/questions/57506231/how-to-mock-file-upload-or-file-object-in-jest.

    user registration and send email

    When user want register, our system should send user's email address an email which contains a link for user to activate his account in our system. And we decide to put the a encoded string which contains the information of his email in the link. We do like this, because we don't want to create a user in our database before the user activates his account.

    dataSource in apollo-server

    the file in datasource folder should only communicate with DB, and in particular, components.js should only communicate the collection Components in MongoDb. So we should keep the other logic in resolver or in some services.

    debug in Jest

    when use Jest to test , debug is an annoying thing. The message in most situation doesn't show the real problem. When it shows a 400 error from server, it means that there is some wrong in your graphql structure.

    apollo server engine

    apollo server engine is a good online tool that help the developer statistics the visiting data and errors. With this tool, developer can easily know the running status of the website.

    Altair

    Altair is a good tool send request with file to apollo-server.

  • 相关阅读:
    Java字符串比较
    Java中定义不了可变长数组怎么办---集合 泛型
    Java后台读取excel表格返回至Web前端
    JAVA中Stringbuffer的append( )方法
    Java操作Excel中HSSFCell.CELL_TYPE_STRING、BOOLEAN、NUMERIC无定义解决方法
    数据结构---公交线路提示系统05(内附读取表格+迪杰斯特拉算法Java代码)
    .getCellType()的几种类型值
    数据结构---公交线路提示系统04
    数据结构---公交线路提示系统03
    转载一篇较为详细的caffe-ssd编译环境的搭建
  • 原文地址:https://www.cnblogs.com/Andres/p/11360268.html
Copyright © 2011-2022 走看看